pub struct EditTool { /* private fields */ }Expand description
Tool for making exact string replacements in files within allowed directories.
Implementations§
Source§impl EditTool
impl EditTool
Sourcepub fn new(resolver: AllowedPathResolver) -> Self
pub fn new(resolver: AllowedPathResolver) -> Self
Creates a new edit tool with a shared resolver.
See ReadTool::new for usage example.
Trait Implementations§
Source§impl Tool for EditTool
impl Tool for EditTool
Source§async fn definition(&self, _prompt: String) -> ToolDefinition
async fn definition(&self, _prompt: String) -> ToolDefinition
A method returning the tool definition. The user prompt can be used to
tailor the definition to the specific use case.
Auto Trait Implementations§
impl Freeze for EditTool
impl RefUnwindSafe for EditTool
impl Send for EditTool
impl Sync for EditTool
impl Unpin for EditTool
impl UnwindSafe for EditTool
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