pub struct BashTool<E: Environment> { /* private fields */ }Expand description
Tool for executing shell commands
Implementations§
Source§impl<E: Environment> BashTool<E>
impl<E: Environment> BashTool<E>
pub const fn new(environment: Arc<E>, capabilities: AgentCapabilities) -> Self
Trait Implementations§
Source§impl<E: Environment + 'static> Tool<()> for BashTool<E>
impl<E: Environment + 'static> Tool<()> for BashTool<E>
Source§fn description(&self) -> &'static str
fn description(&self) -> &'static str
Human-readable description of what the tool does
Source§fn input_schema(&self) -> Value
fn input_schema(&self) -> Value
JSON schema for the tool’s input parameters
Source§fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: &'life1 ToolContext<()>,
input: Value,
) -> Pin<Box<dyn Future<Output = Result<ToolResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: &'life1 ToolContext<()>,
input: Value,
) -> Pin<Box<dyn Future<Output = Result<ToolResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute the tool with the given input Read more
Auto Trait Implementations§
impl<E> Freeze for BashTool<E>
impl<E> RefUnwindSafe for BashTool<E>where
E: RefUnwindSafe,
impl<E> Send for BashTool<E>
impl<E> Sync for BashTool<E>
impl<E> Unpin for BashTool<E>
impl<E> UnwindSafe for BashTool<E>where
E: RefUnwindSafe,
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