Open
Description
Say if I've a trait:
trait Tool: Sized + Send + Sync + 'static {
fn foo(&self, x: i32, y: i32);
fn bar(&self, x: i32, y: i32);
}
Is there any way that I can treat functions foo
and bar
as tool calls?
I was checking the calculator example and on line 37 there is #[tool(tool_box)]
implemented on a trait, but I can't directly do that on my Tool
trait. So is there any way to directly treat a trait as a set of tool calls? Or is there any way to set the implementation of the trait as a tool call?
Metadata
Metadata
Assignees
Labels
No labels