pub struct FunctionObjectArgs { /* private fields */ }chat-completion-types only.Expand description
Builder for FunctionObject.
Implementations§
Source§impl FunctionObjectArgs
impl FunctionObjectArgs
Sourcepub fn name<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Available on (crate features response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) and (crate features chat-completion-types or assistant-types) only.
pub fn name<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) and (crate features chat-completion-types or assistant-types) only.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.
Sourcepub fn description<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Available on (crate features response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) and (crate features chat-completion-types or assistant-types) only.
pub fn description<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) and (crate features chat-completion-types or assistant-types) only.A description of what the function does, used by the model to choose when and how to call the function.
Sourcepub fn parameters<VALUE: Into<Value>>(&mut self, value: VALUE) -> &mut Self
Available on (crate features response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) and (crate features chat-completion-types or assistant-types) only.
pub fn parameters<VALUE: Into<Value>>(&mut self, value: VALUE) -> &mut Self
response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) and (crate features chat-completion-types or assistant-types) only.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.
Sourcepub fn strict<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
Available on (crate features response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) and (crate features chat-completion-types or assistant-types) only.
pub fn strict<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) and (crate features chat-completion-types or assistant-types) only.Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the parameters field. Only a subset of JSON Schema is supported when strict is true. Learn more about Structured Outputs in the function calling guide.
Sourcepub fn build(&self) -> Result<FunctionObject, OpenAIError>
Available on (crate features response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) and (crate features chat-completion-types or assistant-types) only.
pub fn build(&self) -> Result<FunctionObject, OpenAIError>
response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) and (crate features chat-completion-types or assistant-types) only.Trait Implementations§
Source§impl Clone for FunctionObjectArgs
Available on (crate features chat-completion-types or assistant-types) and (crate features response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) only.
impl Clone for FunctionObjectArgs
chat-completion-types or assistant-types) and (crate features response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) only.Source§fn clone(&self) -> FunctionObjectArgs
fn clone(&self) -> FunctionObjectArgs
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FunctionObjectArgs
Available on (crate features chat-completion-types or assistant-types) and (crate features response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) only.
impl Debug for FunctionObjectArgs
chat-completion-types or assistant-types) and (crate features response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) only.Source§impl Default for FunctionObjectArgs
Available on (crate features chat-completion-types or assistant-types) and (crate features response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) only.
impl Default for FunctionObjectArgs
chat-completion-types or assistant-types) and (crate features response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) only.