pub struct FunctionDeclaration {
pub response: Option<Schema>,
pub description: Option<String>,
pub name: String,
pub parameters: Option<Schema>,
}Expand description
Defines a function that the model can generate JSON inputs for.
Fields§
§response: Option<Schema>Describes the output from the function in the OpenAPI JSON Schema Object format.
description: Option<String>Optional. Description and purpose of the function.
name: StringRequired. The name of the function to call.
parameters: Option<Schema>Optional. Describes the parameters to this function in JSON Schema Object format.
Implementations§
Source§impl FunctionDeclaration
impl FunctionDeclaration
Sourcepub fn response(self, value: impl Into<Schema>) -> Self
pub fn response(self, value: impl Into<Schema>) -> Self
Sets the response field of this struct.
Sourcepub fn description(self, value: impl Into<String>) -> Self
pub fn description(self, value: impl Into<String>) -> Self
Sets the description field of this struct.
Sourcepub fn parameters(self, value: impl Into<Schema>) -> Self
pub fn parameters(self, value: impl Into<Schema>) -> Self
Sets the parameters field of this struct.
Trait Implementations§
Source§impl Clone for FunctionDeclaration
impl Clone for FunctionDeclaration
Source§fn clone(&self) -> FunctionDeclaration
fn clone(&self) -> FunctionDeclaration
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 FunctionDeclaration
impl Debug for FunctionDeclaration
Source§impl Default for FunctionDeclaration
impl Default for FunctionDeclaration
Source§fn default() -> FunctionDeclaration
fn default() -> FunctionDeclaration
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FunctionDeclaration
impl<'de> Deserialize<'de> for FunctionDeclaration
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 FunctionDeclaration
impl RefUnwindSafe for FunctionDeclaration
impl Send for FunctionDeclaration
impl Sync for FunctionDeclaration
impl Unpin for FunctionDeclaration
impl UnwindSafe for FunctionDeclaration
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