pub struct AgentTool {
pub name: String,
pub description: String,
pub input_schema: Value,
pub output_schema: Value,
pub function: String,
}Expand description
One function-backed tool an agent may ask the model to call.
Fields§
§name: StringName exposed to the model.
description: StringHuman description passed to the model.
input_schema: ValueJSON Schema for arguments the model must provide.
output_schema: ValueJSON Schema the function returns. Stored for docs/UI and validation by convention; the function itself is still the authority at runtime.
function: StringLoaded function name to invoke when this tool is called.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AgentTool
impl<'de> Deserialize<'de> for AgentTool
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AgentTool
impl RefUnwindSafe for AgentTool
impl Send for AgentTool
impl Sync for AgentTool
impl Unpin for AgentTool
impl UnsafeUnpin for AgentTool
impl UnwindSafe for AgentTool
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