pub struct ChatFunction {
pub name: String,
pub description: Option<String>,
pub parameters: Option<Value>,
}
Fields§
§name: String
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<String>
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 ChatFunction
impl Clone for ChatFunction
Source§fn clone(&self) -> ChatFunction
fn clone(&self) -> ChatFunction
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ChatFunction
impl Debug for ChatFunction
Source§impl Default for ChatFunction
impl Default for ChatFunction
Source§fn default() -> ChatFunction
fn default() -> ChatFunction
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ChatFunction
impl<'de> Deserialize<'de> for ChatFunction
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 ChatFunction
impl PartialEq for ChatFunction
Source§impl Serialize for ChatFunction
impl Serialize for ChatFunction
impl StructuralPartialEq for ChatFunction
Auto Trait Implementations§
impl Freeze for ChatFunction
impl RefUnwindSafe for ChatFunction
impl Send for ChatFunction
impl Sync for ChatFunction
impl Unpin for ChatFunction
impl UnwindSafe for ChatFunction
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