pub struct OpenAiFunctionParameters {
pub type: TypeTrue,
pub properties: HashMap<String, JsonSchema>,
pub required: Option<Vec<String>>,
}
Fields§
§type: TypeTrue
This must be set to ‘object’. It instructs the model to return a JSON object containing the function call properties.
properties: HashMap<String, JsonSchema>
This provides a description of the properties required by the function. JSON Schema can be used to specify expectations for each property. Refer to this doc for a comprehensive guide on JSON Schema.
required: Option<Vec<String>>
This specifies the properties that are required by the function.
Implementations§
Source§impl OpenAiFunctionParameters
impl OpenAiFunctionParameters
pub fn new( type: TypeTrue, properties: HashMap<String, JsonSchema>, ) -> OpenAiFunctionParameters
Trait Implementations§
Source§impl Clone for OpenAiFunctionParameters
impl Clone for OpenAiFunctionParameters
Source§fn clone(&self) -> OpenAiFunctionParameters
fn clone(&self) -> OpenAiFunctionParameters
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 OpenAiFunctionParameters
impl Debug for OpenAiFunctionParameters
Source§impl Default for OpenAiFunctionParameters
impl Default for OpenAiFunctionParameters
Source§fn default() -> OpenAiFunctionParameters
fn default() -> OpenAiFunctionParameters
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for OpenAiFunctionParameters
impl<'de> Deserialize<'de> for OpenAiFunctionParameters
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 OpenAiFunctionParameters
impl PartialEq for OpenAiFunctionParameters
Source§impl Serialize for OpenAiFunctionParameters
impl Serialize for OpenAiFunctionParameters
impl StructuralPartialEq for OpenAiFunctionParameters
Auto Trait Implementations§
impl Freeze for OpenAiFunctionParameters
impl RefUnwindSafe for OpenAiFunctionParameters
impl Send for OpenAiFunctionParameters
impl Sync for OpenAiFunctionParameters
impl Unpin for OpenAiFunctionParameters
impl UnwindSafe for OpenAiFunctionParameters
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