Skip to main content

ToolExecutor

Trait ToolExecutor 

Source
pub trait ToolExecutor: Send + Sync {
    // Required methods
    fn execute<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        definition: &'life1 ToolDefinition,
        call_id: &'life2 str,
        arguments: Value,
        partial_tx: Option<UnboundedSender<String>>,
    ) -> Pin<Box<dyn Future<Output = SoulResult<ToolOutput>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn executor_name(&self) -> &str;
}
Expand description

Trait for executing tools via different backends.

Required Methods§

Source

fn execute<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, definition: &'life1 ToolDefinition, call_id: &'life2 str, arguments: Value, partial_tx: Option<UnboundedSender<String>>, ) -> Pin<Box<dyn Future<Output = SoulResult<ToolOutput>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Execute a tool call.

Source

fn executor_name(&self) -> &str

Name of this executor type.

Implementors§