pub struct ToolBundle { /* private fields */ }Expand description
将多个 Tool 合并为一个,方便批量注册进 agent。
Implementations§
Trait Implementations§
Source§impl Tool for ToolBundle
impl Tool for ToolBundle
Source§fn raw_tools(&self) -> Vec<RawTool>
fn raw_tools(&self) -> Vec<RawTool>
Return the list of raw tool definitions to send to the API.
Source§fn call<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
args: Value,
) -> Pin<Box<dyn Future<Output = Value> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn call<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
args: Value,
) -> Pin<Box<dyn Future<Output = Value> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Invoke the named tool with the given arguments and return the result as a JSON value. Read more
Auto Trait Implementations§
impl Freeze for ToolBundle
impl !RefUnwindSafe for ToolBundle
impl Send for ToolBundle
impl Sync for ToolBundle
impl Unpin for ToolBundle
impl UnsafeUnpin for ToolBundle
impl !UnwindSafe for ToolBundle
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