Tool

Trait Tool 

Source
pub trait Tool: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn description(&self) -> &str;
    fn parameters(&self) -> Vec<Parameter>;
    fn execute<'life0, 'life1, 'async_trait>(
        &'life0 self,
        args: &'life1 ToolArgs,
    ) -> Pin<Box<dyn Future<Output = Result<ToolResult, ToolError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Tool trait

Required Methods§

Source

fn name(&self) -> &str

Source

fn description(&self) -> &str

Source

fn parameters(&self) -> Vec<Parameter>

Source

fn execute<'life0, 'life1, 'async_trait>( &'life0 self, args: &'life1 ToolArgs, ) -> Pin<Box<dyn Future<Output = Result<ToolResult, ToolError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§