pub struct ToolExecutor { /* private fields */ }Expand description
Tool executor that manages tool execution
Implementations§
Source§impl ToolExecutor
impl ToolExecutor
Sourcepub fn register_tool(&mut self, tool: Box<dyn Tool>)
pub fn register_tool(&mut self, tool: Box<dyn Tool>)
Register a tool
Sourcepub fn list_tools(&self) -> Vec<&str>
pub fn list_tools(&self) -> Vec<&str>
List all available tools
Sourcepub async fn execute(&self, call: ToolCall) -> Result<ToolResult>
pub async fn execute(&self, call: ToolCall) -> Result<ToolResult>
Execute a tool call
Sourcepub fn get_tool_definitions(&self) -> Vec<ToolDefinition>
pub fn get_tool_definitions(&self) -> Vec<ToolDefinition>
Get tool definitions for LLM function calling
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ToolExecutor
impl !RefUnwindSafe for ToolExecutor
impl Send for ToolExecutor
impl Sync for ToolExecutor
impl Unpin for ToolExecutor
impl !UnwindSafe for ToolExecutor
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