pub struct ParallelTaskTool { /* private fields */ }Expand description
ParallelTaskTool allows the LLM to fan-out multiple subagent tasks concurrently.
All tasks execute in parallel and the tool returns when all complete.
Implementations§
Source§impl ParallelTaskTool
impl ParallelTaskTool
Sourcepub fn new(executor: Arc<TaskExecutor>) -> Self
pub fn new(executor: Arc<TaskExecutor>) -> Self
Create a new ParallelTaskTool
Trait Implementations§
Source§impl Tool for ParallelTaskTool
impl Tool for ParallelTaskTool
Source§fn description(&self) -> &str
fn description(&self) -> &str
Human-readable description for LLM
Source§fn parameters(&self) -> Value
fn parameters(&self) -> Value
JSON Schema for tool parameters
Source§fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
args: &'life1 Value,
ctx: &'life2 ToolContext,
) -> Pin<Box<dyn Future<Output = Result<ToolOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
args: &'life1 Value,
ctx: &'life2 ToolContext,
) -> Pin<Box<dyn Future<Output = Result<ToolOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Execute the tool with given arguments
Auto Trait Implementations§
impl Freeze for ParallelTaskTool
impl !RefUnwindSafe for ParallelTaskTool
impl Send for ParallelTaskTool
impl Sync for ParallelTaskTool
impl Unpin for ParallelTaskTool
impl UnsafeUnpin for ParallelTaskTool
impl !UnwindSafe for ParallelTaskTool
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