pub enum InteractionTool {
Function {
name: Option<String>,
description: Option<String>,
parameters: Option<Value>,
},
CodeExecution,
UrlContext,
ComputerUse {
environment: Option<ComputerUseEnvironment>,
excluded_predefined_functions: Vec<String>,
enable_prompt_injection_detection: Option<bool>,
disabled_safety_policies: Vec<ComputerUseSafetyPolicy>,
},
McpServer {
name: Option<String>,
url: Option<String>,
headers: Option<Value>,
allowed_tools: Option<AllowedTools>,
},
GoogleSearch {
search_types: Vec<GoogleSearchType>,
},
FileSearch {
file_search_store_names: Vec<String>,
top_k: Option<i64>,
metadata_filter: Option<String>,
},
GoogleMaps {
enable_widget: Option<bool>,
latitude: Option<f64>,
longitude: Option<f64>,
},
Retrieval {
retrieval_types: Vec<RetrievalType>,
exa_ai_search_config: Option<ExaAISearchConfig>,
parallel_ai_search_config: Option<ParallelAISearchConfig>,
rag_store_config: Option<RagStoreConfig>,
},
}Expand description
Tool declaration — type-tagged polymorphic.
Variants§
Function
CodeExecution
UrlContext
ComputerUse
Fields
§
environment: Option<ComputerUseEnvironment>§
disabled_safety_policies: Vec<ComputerUseSafetyPolicy>McpServer
Fields
§
allowed_tools: Option<AllowedTools>GoogleSearch
Fields
§
search_types: Vec<GoogleSearchType>FileSearch
GoogleMaps
Retrieval
Fields
§
retrieval_types: Vec<RetrievalType>§
exa_ai_search_config: Option<ExaAISearchConfig>§
parallel_ai_search_config: Option<ParallelAISearchConfig>§
rag_store_config: Option<RagStoreConfig>Implementations§
Source§impl InteractionTool
impl InteractionTool
Sourcepub fn function(
name: impl Into<String>,
description: impl Into<String>,
parameters: Value,
) -> Self
pub fn function( name: impl Into<String>, description: impl Into<String>, parameters: Value, ) -> Self
Create a function tool.
Sourcepub fn google_search() -> Self
pub fn google_search() -> Self
Create a Google Search tool.
Sourcepub fn code_execution() -> Self
pub fn code_execution() -> Self
Create a code execution tool.
Sourcepub fn url_context() -> Self
pub fn url_context() -> Self
Create a URL context tool.
Sourcepub fn google_maps() -> Self
pub fn google_maps() -> Self
Create a Google Maps tool.
Sourcepub fn file_search(store_names: Vec<String>) -> Self
pub fn file_search(store_names: Vec<String>) -> Self
Create a file search tool.
Sourcepub fn mcp_server(name: impl Into<String>, url: impl Into<String>) -> Self
pub fn mcp_server(name: impl Into<String>, url: impl Into<String>) -> Self
Create an MCP Server tool.
Sourcepub fn computer_use(environment: ComputerUseEnvironment) -> Self
pub fn computer_use(environment: ComputerUseEnvironment) -> Self
Create a computer use tool.
Sourcepub fn retrieval(retrieval_types: Vec<RetrievalType>) -> Self
pub fn retrieval(retrieval_types: Vec<RetrievalType>) -> Self
Create a retrieval tool.
Trait Implementations§
Source§impl Clone for InteractionTool
impl Clone for InteractionTool
Source§fn clone(&self) -> InteractionTool
fn clone(&self) -> InteractionTool
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 InteractionTool
impl Debug for InteractionTool
Source§impl<'de> Deserialize<'de> for InteractionTool
impl<'de> Deserialize<'de> for InteractionTool
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
Source§impl PartialEq for InteractionTool
impl PartialEq for InteractionTool
Source§impl Serialize for InteractionTool
impl Serialize for InteractionTool
impl StructuralPartialEq for InteractionTool
Auto Trait Implementations§
impl Freeze for InteractionTool
impl RefUnwindSafe for InteractionTool
impl Send for InteractionTool
impl Sync for InteractionTool
impl Unpin for InteractionTool
impl UnsafeUnpin for InteractionTool
impl UnwindSafe for InteractionTool
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