Skip to main content

ToolAdapter

Trait ToolAdapter 

Source
pub trait ToolAdapter:
    Send
    + Sync
    + 'static {
    // Required method
    fn call<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        tool_name: &'life1 str,
        input: &'life2 Value,
    ) -> Pin<Box<dyn Future<Output = Result<Value, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Adapter contract for actual tool invocation.

Required Methods§

Source

fn call<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tool_name: &'life1 str, input: &'life2 Value, ) -> Pin<Box<dyn Future<Output = Result<Value, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Implementors§