pub struct SimpleMathTool;Expand description
Advanced math tool for agents.
Implementations§
Trait Implementations§
Source§impl BaseTool for SimpleMathTool
impl BaseTool for SimpleMathTool
Source§fn description(&self) -> &str
fn description(&self) -> &str
Returns the tool description. Read more
Source§fn run<'life0, 'async_trait>(
&'life0 self,
input: String,
) -> Pin<Box<dyn Future<Output = Result<String, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn run<'life0, 'async_trait>(
&'life0 self,
input: String,
) -> Pin<Box<dyn Future<Output = Result<String, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute the tool (string version). Read more
Source§fn return_direct(&self) -> bool
fn return_direct(&self) -> bool
Whether to return result directly to user. Read more
Source§impl Default for SimpleMathTool
impl Default for SimpleMathTool
Source§impl Tool for SimpleMathTool
impl Tool for SimpleMathTool
Source§type Output = MathOutput
type Output = MathOutput
Output type (must support serialization).
Source§fn invoke<'life0, 'async_trait>(
&'life0 self,
input: Self::Input,
) -> Pin<Box<dyn Future<Output = Result<Self::Output, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn invoke<'life0, 'async_trait>(
&'life0 self,
input: Self::Input,
) -> Pin<Box<dyn Future<Output = Result<Self::Output, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute the tool. Read more
Source§fn args_schema(&self) -> Option<Value>
fn args_schema(&self) -> Option<Value>
Returns the input JSON Schema.
Auto Trait Implementations§
impl Freeze for SimpleMathTool
impl RefUnwindSafe for SimpleMathTool
impl Send for SimpleMathTool
impl Sync for SimpleMathTool
impl Unpin for SimpleMathTool
impl UnsafeUnpin for SimpleMathTool
impl UnwindSafe for SimpleMathTool
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