pub struct FunctionTool {
pub name: Cow<'static, str>,
pub description: Option<Cow<'static, str>>,
pub parameters: Option<Value>,
}
Fields§
§name: Cow<'static, str>
The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
description: Option<Cow<'static, str>>
A description of what the function does, used by the model to choose when and how to call the function.
parameters: Option<Value>
The parameters the functions accepts, described as a JSON Schema object. See the guide for examples, and the JSON Schema reference for documentation about the format.
Omitting parameters
defines a function with an empty parameter list.
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
Source§impl Default for FunctionTool
impl Default for FunctionTool
Source§fn default() -> FunctionTool
fn default() -> FunctionTool
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FunctionTool
impl<'de> Deserialize<'de> for FunctionTool
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
Source§impl PartialEq for FunctionTool
impl PartialEq for FunctionTool
Source§impl Serialize for FunctionTool
impl Serialize for FunctionTool
impl StructuralPartialEq 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