pub struct StateTool { /* private fields */ }Expand description
Tool for displaying and managing state
Implementations§
Trait Implementations§
Source§impl Tool for StateTool
impl Tool for StateTool
Source§fn description(&self) -> &str
fn description(&self) -> &str
Get the tool description
Source§fn validate_args(&self, _args: &ToolArgs) -> Result<(), ToolError>
fn validate_args(&self, _args: &ToolArgs) -> Result<(), ToolError>
Validate arguments before execution
Source§fn execute(
&mut self,
_args: &ToolArgs,
state: &Arc<Mutex<ToolState>>,
) -> Result<ToolResult>
fn execute( &mut self, _args: &ToolArgs, state: &Arc<Mutex<ToolState>>, ) -> Result<ToolResult>
Execute the tool with given arguments
Source§fn get_parameters_schema(&self) -> Value
fn get_parameters_schema(&self) -> Value
Get parameters schema - should be overridden by implementing tools
Source§fn get_openai_schema(&self) -> Value
fn get_openai_schema(&self) -> Value
Get OpenAI function schema for this tool
Auto Trait Implementations§
impl Freeze for StateTool
impl RefUnwindSafe for StateTool
impl Send for StateTool
impl Sync for StateTool
impl Unpin for StateTool
impl UnwindSafe for StateTool
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