pub struct BashTool { /* private fields */ }Expand description
Tool for executing bash commands.
Implementations§
Trait Implementations§
Source§impl Tool for BashTool
impl Tool for BashTool
Source§fn description(&self) -> &str
fn description(&self) -> &str
A human-readable description of what the tool does.
Source§fn input_schema(&self) -> Value
fn input_schema(&self) -> Value
JSON Schema describing the tool’s input parameters.
Source§fn execute<'life0, 'async_trait>(
&'life0 self,
input: Value,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
input: Value,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute the tool with the given JSON input and return the result as a string.
Source§fn to_definition(&self) -> ToolDefinition
fn to_definition(&self) -> ToolDefinition
Convert this tool to a
ToolDefinition for the LLM API.Auto Trait Implementations§
impl Freeze for BashTool
impl RefUnwindSafe for BashTool
impl Send for BashTool
impl Sync for BashTool
impl Unpin for BashTool
impl UnwindSafe for BashTool
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