pub struct SimpleTool<F>{ /* private fields */ }Expand description
Simple tool that takes no arguments
Implementations§
Trait Implementations§
Source§impl<F> Tool for SimpleTool<F>
impl<F> Tool for SimpleTool<F>
Source§fn description(&self) -> &str
fn description(&self) -> &str
Get the tool description
Source§fn definition(&self) -> ToolDefinition
fn definition(&self) -> ToolDefinition
Get the tool definition (JSON Schema)
Source§fn execute<'life0, 'async_trait>(
&'life0 self,
_args: Value,
_overrides: Option<HashMap<String, Box<dyn Any + Send + Sync>>>,
) -> 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,
_overrides: Option<HashMap<String, Box<dyn Any + Send + Sync>>>,
) -> Pin<Box<dyn Future<Output = Result<ToolResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute the tool with given arguments
Source§fn ephemeral(&self) -> EphemeralConfig
fn ephemeral(&self) -> EphemeralConfig
Whether tool outputs should be ephemeral (removed from context after use)
Auto Trait Implementations§
impl<F> Freeze for SimpleTool<F>where
F: Freeze,
impl<F> RefUnwindSafe for SimpleTool<F>where
F: RefUnwindSafe,
impl<F> Send for SimpleTool<F>
impl<F> Sync for SimpleTool<F>
impl<F> Unpin for SimpleTool<F>where
F: Unpin,
impl<F> UnsafeUnpin for SimpleTool<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for SimpleTool<F>where
F: UnwindSafe,
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