ToolExecutor

Trait ToolExecutor 

Source
pub trait ToolExecutor: Send + Sync {
    // Required methods
    fn execute_tool<'life0, 'life1, 'async_trait>(
        &'life0 self,
        name: &'life1 str,
        args: Value,
    ) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn available_tools(&self) -> Vec<String>;
    fn has_tool(&self, name: &str) -> bool;
}
Expand description

Main tool executor that coordinates all tools

Required Methods§

Source

fn execute_tool<'life0, 'life1, 'async_trait>( &'life0 self, name: &'life1 str, args: Value, ) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Execute a tool by name

Source

fn available_tools(&self) -> Vec<String>

List available tools

Source

fn has_tool(&self, name: &str) -> bool

Check if a tool exists

Implementors§