pub struct DefaultToolManager { /* private fields */ }Expand description
Default tool manager that delegates to existing runner functions.
Implementations§
Source§impl DefaultToolManager
impl DefaultToolManager
pub fn new(tools: Arc<dyn ToolExecutor>, llm: Arc<dyn LLMProvider>) -> Self
Trait Implementations§
Source§impl ToolManager for DefaultToolManager
impl ToolManager for DefaultToolManager
Source§fn resolve_tool_schemas(
&self,
config: &AgentLoopConfig,
session: &Session,
) -> Vec<ToolSchema>
fn resolve_tool_schemas( &self, config: &AgentLoopConfig, session: &Session, ) -> Vec<ToolSchema>
Resolve available tool schemas for the session.
Source§fn execute_tool_calls<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'life7, 'life8, 'life9, 'async_trait>(
&'life0 self,
tool_calls: &'life1 [ToolCall],
event_tx: &'life2 Sender<AgentEvent>,
metrics_collector: Option<&'life3 MetricsCollector>,
session_id: &'life4 str,
round_id: &'life5 str,
round: usize,
session: &'life6 mut Session,
config: &'life7 AgentLoopConfig,
task_context: &'life8 mut Option<TaskLoopContext>,
tool_schemas: &'life9 [ToolSchema],
) -> Pin<Box<dyn Future<Output = Result<ToolRoundResult, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
'life7: 'async_trait,
'life8: 'async_trait,
'life9: 'async_trait,
fn execute_tool_calls<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'life7, 'life8, 'life9, 'async_trait>(
&'life0 self,
tool_calls: &'life1 [ToolCall],
event_tx: &'life2 Sender<AgentEvent>,
metrics_collector: Option<&'life3 MetricsCollector>,
session_id: &'life4 str,
round_id: &'life5 str,
round: usize,
session: &'life6 mut Session,
config: &'life7 AgentLoopConfig,
task_context: &'life8 mut Option<TaskLoopContext>,
tool_schemas: &'life9 [ToolSchema],
) -> Pin<Box<dyn Future<Output = Result<ToolRoundResult, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
'life7: 'async_trait,
'life8: 'async_trait,
'life9: 'async_trait,
Execute tool calls for a round.
Auto Trait Implementations§
impl Freeze for DefaultToolManager
impl !RefUnwindSafe for DefaultToolManager
impl Send for DefaultToolManager
impl Sync for DefaultToolManager
impl Unpin for DefaultToolManager
impl UnsafeUnpin for DefaultToolManager
impl !UnwindSafe for DefaultToolManager
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