pub struct Tool {
pub typ: ToolType,
pub name: Option<String>,
pub description: Option<String>,
pub parameters: Option<Value>,
}Expand description
A tool the model may call.
Fields§
§typ: ToolTypeThe type of the tool.
name: Option<String>For function tools. The name of the function. Must be non-empty, at most 128 characters,
match ^[a-zA-Z0-9_-]+$, and be unique across all tools.
description: Option<String>For function tools. A description of what the function does.
parameters: Option<Value>The parameters the function accepts, described as a JSON Schema object.
Omitting parameters defines a function with an empty parameter list.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Tool
Auto Trait Implementations§
impl Freeze for Tool
impl RefUnwindSafe for Tool
impl Send for Tool
impl Sync for Tool
impl Unpin for Tool
impl UnsafeUnpin for Tool
impl UnwindSafe for Tool
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