ToolFunction

Type Alias ToolFunction 

Source
pub type ToolFunction = Arc<dyn Fn(Value) -> Pin<Box<dyn Future<Output = Result<ToolResult>> + Send>> + Send + Sync>;
Expand description

Type alias for the tool execution function. This is a boxed async function that takes JSON arguments and returns a ToolResult.

Aliased Typeยง

pub struct ToolFunction { /* private fields */ }