pub struct Edit { /* private fields */ }Expand description
The edit tool.
Implementations§
Trait Implementations§
Source§impl Tool for Edit
impl Tool for Edit
Source§fn prepare_arguments(&self, args: Map<String, Value>) -> Map<String, Value>
fn prepare_arguments(&self, args: Map<String, Value>) -> Map<String, Value>
Accepts edits as a JSON string or a single object, and the legacy
top-level oldText/newText.
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 Edit
impl Freeze for Edit
impl RefUnwindSafe for Edit
impl Send for Edit
impl Sync for Edit
impl Unpin for Edit
impl UnsafeUnpin for Edit
impl UnwindSafe for Edit
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