pub enum ChatCompletionToolChoiceOption {
None,
Auto,
Named(ChatCompletionNamedToolChoice),
}
Expand description
Controls which (if any) function is called by the model.
none
means the model will not call a function and instead generates a message.
auto
means the model can pick between generating a message or calling a function.
Specifying a particular function via {"type: "function", "function": {"name": "my_function"}}
forces the model to call that function.
none
is the default when no functions are present. auto
is the default if functions are present.
Variants§
Trait Implementations§
source§impl Clone for ChatCompletionToolChoiceOption
impl Clone for ChatCompletionToolChoiceOption
source§fn clone(&self) -> ChatCompletionToolChoiceOption
fn clone(&self) -> ChatCompletionToolChoiceOption
Returns a copy 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 Default for ChatCompletionToolChoiceOption
impl Default for ChatCompletionToolChoiceOption
source§fn default() -> ChatCompletionToolChoiceOption
fn default() -> ChatCompletionToolChoiceOption
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for ChatCompletionToolChoiceOption
impl<'de> Deserialize<'de> for ChatCompletionToolChoiceOption
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 From<&str> for ChatCompletionToolChoiceOption
impl From<&str> for ChatCompletionToolChoiceOption
source§impl From<String> for ChatCompletionToolChoiceOption
impl From<String> for ChatCompletionToolChoiceOption
source§impl PartialEq for ChatCompletionToolChoiceOption
impl PartialEq for ChatCompletionToolChoiceOption
source§fn eq(&self, other: &ChatCompletionToolChoiceOption) -> bool
fn eq(&self, other: &ChatCompletionToolChoiceOption) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ChatCompletionToolChoiceOption
Auto Trait Implementations§
impl RefUnwindSafe for ChatCompletionToolChoiceOption
impl Send for ChatCompletionToolChoiceOption
impl Sync for ChatCompletionToolChoiceOption
impl Unpin for ChatCompletionToolChoiceOption
impl UnwindSafe for ChatCompletionToolChoiceOption
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