pub struct ToolRegistry { /* private fields */ }Expand description
Registry for managing available tools
Implementations§
Source§impl ToolRegistry
impl ToolRegistry
Sourcepub fn execute_tool(
&mut self,
name: &str,
args: &ToolArgs,
) -> Result<ToolResult, ToolError>
pub fn execute_tool( &mut self, name: &str, args: &ToolArgs, ) -> Result<ToolResult, ToolError>
Execute a tool by name
Sourcepub fn list_tools(&self) -> Vec<String>
pub fn list_tools(&self) -> Vec<String>
List all registered tool names
Sourcepub fn get_all_schemas(&self) -> Vec<Value>
pub fn get_all_schemas(&self) -> Vec<Value>
Get OpenAI function schemas for all tools
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ToolRegistry
impl !RefUnwindSafe for ToolRegistry
impl Send for ToolRegistry
impl Sync for ToolRegistry
impl Unpin for ToolRegistry
impl !UnwindSafe for ToolRegistry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more