pub struct Tool {
pub function_declarations: Option<Vec<FunctionDeclaration>>,
pub retrieval: Option<Retrieval>,
pub google_search: Option<GoogleSearch>,
pub google_search_retrieval: Option<GoogleSearchRetrieval>,
pub code_execution: Option<ToolCodeExecution>,
}Expand description
Tool details of a tool that the model may use to generate a response.
Fields§
§function_declarations: Option<Vec<FunctionDeclaration>>List of function declarations that the tool supports.
retrieval: Option<Retrieval>Optional. Retrieval tool type.
google_search: Option<GoogleSearch>Optional. Google Search tool type.
google_search_retrieval: Option<GoogleSearchRetrieval>Optional. GoogleSearchRetrieval tool type.
code_execution: Option<ToolCodeExecution>Optional. CodeExecution tool type.
Implementations§
Source§impl Tool
impl Tool
Sourcepub fn function_declarations(
self,
value: impl Into<Vec<FunctionDeclaration>>,
) -> Self
pub fn function_declarations( self, value: impl Into<Vec<FunctionDeclaration>>, ) -> Self
Sets the function_declarations field of this struct.
Sourcepub fn retrieval(self, value: impl Into<Retrieval>) -> Self
pub fn retrieval(self, value: impl Into<Retrieval>) -> Self
Sets the retrieval field of this struct.
Sourcepub fn google_search(self, value: impl Into<GoogleSearch>) -> Self
pub fn google_search(self, value: impl Into<GoogleSearch>) -> Self
Sets the google_search field of this struct.
Sourcepub fn google_search_retrieval(
self,
value: impl Into<GoogleSearchRetrieval>,
) -> Self
pub fn google_search_retrieval( self, value: impl Into<GoogleSearchRetrieval>, ) -> Self
Sets the google_search_retrieval field of this struct.
Sourcepub fn code_execution(self, value: impl Into<ToolCodeExecution>) -> Self
pub fn code_execution(self, value: impl Into<ToolCodeExecution>) -> Self
Sets the code_execution field of this struct.
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