pub struct ToolExecutor { /* private fields */ }Expand description
Handles tool execution for the agent
Implementations§
Source§impl ToolExecutor
impl ToolExecutor
Sourcepub fn new(registry: ToolRegistry) -> Self
pub fn new(registry: ToolRegistry) -> Self
Create a new tool executor
Sourcepub fn execute_tool_call(&self, tool_call: &ToolCall) -> ChatMessage
pub fn execute_tool_call(&self, tool_call: &ToolCall) -> ChatMessage
Execute a tool call and return the result message
Sourcepub fn execute_tool_calls(&self, tool_calls: &[ToolCall]) -> Vec<ChatMessage>
pub fn execute_tool_calls(&self, tool_calls: &[ToolCall]) -> Vec<ChatMessage>
Execute multiple tool calls
Sourcepub fn registry(&self) -> &ToolRegistry
pub fn registry(&self) -> &ToolRegistry
Get the tool registry
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