pub struct ReadTool { /* private fields */ }Expand description
Tool for reading file contents.
Implementations§
Trait Implementations§
Source§impl Tool for ReadTool
impl Tool for ReadTool
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 ReadTool
impl RefUnwindSafe for ReadTool
impl Send for ReadTool
impl Sync for ReadTool
impl Unpin for ReadTool
impl UnwindSafe for ReadTool
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