pub struct Function {
pub name: String,
pub description: Option<String>,
pub parameters: Value,
pub strict: Option<bool>,
}Fields§
§name: StringThe name of the function to call. Allowed characters: a-z, A-Z, 0-9, underscore and hyphen. Maximum length is 64 characters.
description: Option<String>A description of the function’s behavior to help the model decide when and how to call it.
parameters: ValueThe function’s input parameters described as a JSON Schema object.
See the Tool Calls guide for examples and the JSON Schema reference for format details.
Omitting parameters defines a function that takes an empty parameter list.
strict: Option<bool>Beta feature: when true, the API will use strict mode for function calls. In strict mode, outputs are validated against the function’s JSON schema to ensure compliance. This is a beta feature; consult the Tool Calls guide for usage details.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Function
impl<'de> Deserialize<'de> for Function
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 Function
impl RefUnwindSafe for Function
impl Send for Function
impl Sync for Function
impl Unpin for Function
impl UnsafeUnpin for Function
impl UnwindSafe for Function
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