pub struct IntegrationTool { /* private fields */ }Expand description
Wrapper for tools that come from integrations This allows us to identify which integration a tool belongs to
Implementations§
Trait Implementations§
Source§impl Debug for IntegrationTool
impl Debug for IntegrationTool
Source§impl Tool for IntegrationTool
impl Tool for IntegrationTool
Source§fn get_auth_metadata(&self) -> Option<Box<dyn AuthMetadata>>
fn get_auth_metadata(&self) -> Option<Box<dyn AuthMetadata>>
Override to return tool’s auth metadata - integration auth is handled separately
Source§fn get_plugin_name(&self) -> Option<String>
fn get_plugin_name(&self) -> Option<String>
Return the plugin name this tool belongs to
fn get_name(&self) -> String
fn get_parameters(&self) -> Value
fn get_description(&self) -> String
Source§fn is_external(&self) -> bool
fn is_external(&self) -> bool
Check if this tool is external (handled by frontend)
fn is_sync(&self) -> bool
fn is_final(&self) -> bool
Source§fn needs_executor_context(&self) -> bool
fn needs_executor_context(&self) -> bool
Check if this tool needs ExecutorContext instead of ToolContext
Source§fn execute<'life0, 'async_trait>(
&'life0 self,
tool_call: ToolCall,
context: Arc<ToolContext>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Part>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
tool_call: ToolCall,
context: Arc<ToolContext>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Part>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute the tool with given arguments, returning content parts
Source§fn execute_sync(
&self,
tool_call: ToolCall,
context: Arc<ToolContext>,
) -> Result<Vec<Part>, Error>
fn execute_sync( &self, tool_call: ToolCall, context: Arc<ToolContext>, ) -> Result<Vec<Part>, Error>
Synchronous execution of the tool, returning content parts (default unsupported)
Source§fn get_tool_definition(&self) -> ToolDefinition
fn get_tool_definition(&self) -> ToolDefinition
Get the tool definition for the LLM
fn get_tool_examples(&self) -> Option<String>
Auto Trait Implementations§
impl Freeze for IntegrationTool
impl !RefUnwindSafe for IntegrationTool
impl Send for IntegrationTool
impl Sync for IntegrationTool
impl Unpin for IntegrationTool
impl UnsafeUnpin for IntegrationTool
impl !UnwindSafe for IntegrationTool
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