pub struct Grep { /* private fields */ }Expand description
The grep tool.
Implementations§
Trait Implementations§
Source§impl Tool for Grep
impl Tool for Grep
Source§fn declaration(&self) -> &ToolDeclaration
fn declaration(&self) -> &ToolDeclaration
Name, description and argument schema as sent to the model.
Source§fn execute(
&self,
_call_id: String,
args: Value,
cancel: CancellationToken,
_updates: UpdateSink,
) -> BoxFuture<'_, Result<ToolResult, String>>
fn execute( &self, _call_id: String, args: Value, cancel: CancellationToken, _updates: UpdateSink, ) -> BoxFuture<'_, Result<ToolResult, String>>
Runs the tool with validated arguments.
Source§fn execution_mode(&self) -> ExecutionMode
fn execution_mode(&self) -> ExecutionMode
See
ExecutionMode.Source§fn output_schema(&self) -> Option<&Value>
fn output_schema(&self) -> Option<&Value>
JSON Schema of the value the tool returns as
structuredContent, for
tools whose results scripts consume (pi’s outputSchema).Auto Trait Implementations§
impl Forget for Grep
impl Freeze for Grep
impl RefUnwindSafe for Grep
impl Send for Grep
impl Sync for Grep
impl Unpin for Grep
impl UnsafeUnpin for Grep
impl UnwindSafe for Grep
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