pub struct FunctionDefinition {
pub name: String,
pub description: Option<String>,
pub parameters: Option<HashMap<String, Value>>,
}Fields§
§name: StringThe 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<HashMap<String, Value>>The parameters the function accepts, described as a JSON Schema object.
Implementations§
Source§impl FunctionDefinition
impl FunctionDefinition
pub fn new(name: String) -> FunctionDefinition
Trait Implementations§
Source§impl Clone for FunctionDefinition
impl Clone for FunctionDefinition
Source§fn clone(&self) -> FunctionDefinition
fn clone(&self) -> FunctionDefinition
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 FunctionDefinition
impl Debug for FunctionDefinition
Source§impl Default for FunctionDefinition
impl Default for FunctionDefinition
Source§fn default() -> FunctionDefinition
fn default() -> FunctionDefinition
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FunctionDefinition
impl<'de> Deserialize<'de> for FunctionDefinition
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 FunctionDefinition
impl PartialEq for FunctionDefinition
Source§impl Serialize for FunctionDefinition
impl Serialize for FunctionDefinition
impl StructuralPartialEq for FunctionDefinition
Auto Trait Implementations§
impl Freeze for FunctionDefinition
impl RefUnwindSafe for FunctionDefinition
impl Send for FunctionDefinition
impl Sync for FunctionDefinition
impl Unpin for FunctionDefinition
impl UnsafeUnpin for FunctionDefinition
impl UnwindSafe for FunctionDefinition
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