pub enum Tool {
Function {
function_declarations: Vec<FunctionDeclaration>,
},
GoogleSearch {
google_search: GoogleSearchConfig,
},
}
Expand description
Tool that can be used by the model
Variants§
Function
Function-based tool
Fields
§
function_declarations: Vec<FunctionDeclaration>
The function declaration for the tool
GoogleSearch
Google Search tool
Fields
§
google_search: GoogleSearchConfig
The Google Search configuration
Implementations§
Source§impl Tool
impl Tool
Sourcepub fn new(function_declaration: FunctionDeclaration) -> Self
pub fn new(function_declaration: FunctionDeclaration) -> Self
Create a new tool with a single function declaration
Sourcepub fn with_functions(function_declarations: Vec<FunctionDeclaration>) -> Self
pub fn with_functions(function_declarations: Vec<FunctionDeclaration>) -> Self
Create a new tool with multiple function declarations
Sourcepub fn google_search() -> Self
pub fn google_search() -> Self
Create a new Google Search tool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Tool
impl<'de> Deserialize<'de> for Tool
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 Tool
impl RefUnwindSafe for Tool
impl Send for Tool
impl Sync for Tool
impl Unpin 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