pub trait LlmTool: Send + Sync {
// Required methods
fn run(&self, args: &HashMap<String, Value>) -> Result<Value>;
fn descriptor(&self) -> ToolDescriptor;
fn clone_box(&self) -> Box<dyn LlmTool>;
// Provided method
fn matches(&self, name: &str) -> bool { ... }
}Expand description
Trait for LLM tools
Required Methods§
Sourcefn run(&self, args: &HashMap<String, Value>) -> Result<Value>
fn run(&self, args: &HashMap<String, Value>) -> Result<Value>
Execute the tool with given arguments
Sourcefn descriptor(&self) -> ToolDescriptor
fn descriptor(&self) -> ToolDescriptor
Get tool descriptor for LLM