pub struct DelegateTaskTool { /* private fields */ }Expand description
A tool that allows agents to delegate tasks to other agents.
Implementations§
Source§impl DelegateTaskTool
impl DelegateTaskTool
Sourcepub fn new(
agent_id: AgentId,
message_queue: Arc<RwLock<Vec<ForestMessage>>>,
shared_context: Arc<RwLock<SharedContext>>,
) -> Self
pub fn new( agent_id: AgentId, message_queue: Arc<RwLock<Vec<ForestMessage>>>, shared_context: Arc<RwLock<SharedContext>>, ) -> Self
Creates a new DelegateTaskTool.
Trait Implementations§
Source§impl Tool for DelegateTaskTool
impl Tool for DelegateTaskTool
Source§fn description(&self) -> &str
fn description(&self) -> &str
A description of the tool.
Source§fn parameters(&self) -> HashMap<String, ToolParameter>
fn parameters(&self) -> HashMap<String, ToolParameter>
The parameters for the tool.
Source§fn execute<'life0, 'async_trait>(
&'life0 self,
args: Value,
) -> Pin<Box<dyn Future<Output = Result<ToolResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
args: Value,
) -> Pin<Box<dyn Future<Output = Result<ToolResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Executes the tool with the given arguments.
Source§fn to_definition(&self) -> ToolDefinition
fn to_definition(&self) -> ToolDefinition
Converts the tool to a
ToolDefinition.Auto Trait Implementations§
impl Freeze for DelegateTaskTool
impl !RefUnwindSafe for DelegateTaskTool
impl Send for DelegateTaskTool
impl Sync for DelegateTaskTool
impl Unpin for DelegateTaskTool
impl !UnwindSafe for DelegateTaskTool
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