pub struct FunctionTool {
pub name: String,
pub description: String,
pub parameters: Value,
}
Expand description
Represents a function definition for a tool.
The parameters
field stores the JSON Schema describing the function
arguments. It is kept as a raw serde_json::Value
to allow arbitrary
complexity (nested arrays/objects, oneOf
, etc.) without requiring a
bespoke Rust structure.
Builder helpers can still generate simple schemas automatically, but the user may also provide any valid schema directly.
Fields§
§name: String
Name of the function
description: String
Human-readable description
parameters: Value
JSON Schema describing the parameters
Trait Implementations§
Source§impl Clone for FunctionTool
impl Clone for FunctionTool
Source§fn clone(&self) -> FunctionTool
fn clone(&self) -> FunctionTool
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for FunctionTool
impl Debug for FunctionTool
Auto Trait Implementations§
impl Freeze for FunctionTool
impl RefUnwindSafe for FunctionTool
impl Send for FunctionTool
impl Sync for FunctionTool
impl Unpin for FunctionTool
impl UnwindSafe for FunctionTool
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