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§
Sourcefn 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 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.
Sourcefn executor_name(&self) -> &str
fn executor_name(&self) -> &str
Name of this executor type.