pub struct ModelInput { /* private fields */ }Implementations§
Source§impl ModelInput
impl ModelInput
pub fn new() -> Self
pub fn from_items(items: Vec<ModelInputItem>) -> Self
pub fn items(&self) -> &[ModelInputItem]
pub fn into_items(self) -> Vec<ModelInputItem>
pub fn push(&mut self, item: ModelInputItem)
pub fn system(self, text: impl Into<String>) -> Self
pub fn developer(self, text: impl Into<String>) -> Self
pub fn user(self, text: impl Into<String>) -> Self
pub fn assistant_text(self, text: impl Into<String>) -> Self
pub fn assistant_reasoning(self, text: impl Into<String>) -> Self
pub fn assistant_refusal(self, text: impl Into<String>) -> Self
pub fn tool_use(self, tool_use: ToolUse) -> Self
pub fn validate(&self) -> Result<(), ModelInputValidationError>
Trait Implementations§
Source§impl Clone for ModelInput
impl Clone for ModelInput
Source§fn clone(&self) -> ModelInput
fn clone(&self) -> ModelInput
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModelInput
impl Debug for ModelInput
Source§impl Default for ModelInput
impl Default for ModelInput
Source§fn default() -> ModelInput
fn default() -> ModelInput
Returns the “default value” for a type. Read more
Source§impl From<Vec<ModelInputItem>> for ModelInput
impl From<Vec<ModelInputItem>> for ModelInput
Source§fn from(items: Vec<ModelInputItem>) -> Self
fn from(items: Vec<ModelInputItem>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ModelInput
impl !RefUnwindSafe for ModelInput
impl Send for ModelInput
impl Sync for ModelInput
impl Unpin for ModelInput
impl UnsafeUnpin for ModelInput
impl !UnwindSafe for ModelInput
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more