pub struct ToolDef {
pub name: String,
pub description: Option<String>,
pub input_schema: Value,
}Expand description
A tool the model may call, as declared by the suite.
Anthropic’s field names, because input_schema says what the value is (a
JSON Schema) where OpenAI’s parameters does not, and one of the two shapes
had to win. Mapping to the other vendor is mechanical.
Fields§
§name: String§description: Option<String>§input_schema: ValueJSON Schema for the tool’s arguments.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ToolDef
impl<'de> Deserialize<'de> for ToolDef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ToolDef
impl RefUnwindSafe for ToolDef
impl Send for ToolDef
impl Sync for ToolDef
impl Unpin for ToolDef
impl UnsafeUnpin for ToolDef
impl UnwindSafe for ToolDef
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