pub trait AgentLoopToolExecutor: Send + Sync {
// Required method
fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
arguments: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<String, LLMError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
// Provided method
fn available_tools<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Tool>, LLMError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
}Expand description
Tool executor trait for LLM tool calling.
Required Methods§
Sourcefn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
arguments: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<String, LLMError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
arguments: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<String, LLMError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Execute a tool call by name with JSON arguments.