ThinkToolExecutor

Trait ThinkToolExecutor 

Source
pub trait ThinkToolExecutor: Send + Sync {
    // Required methods
    fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        tool_id: &'life1 str,
        input: &'life2 str,
        context: &'life3 ExecutionContext,
    ) -> Pin<Box<dyn Future<Output = Result<ThinkToolResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn available_tools(&self) -> Vec<&str>;
}
Expand description

Trait for ThinkTool execution (enables custom implementations)

Required Methods§

Source

fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, tool_id: &'life1 str, input: &'life2 str, context: &'life3 ExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<ThinkToolResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Execute a ThinkTool with the given input

Source

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

List available ThinkTools

Implementors§