pub enum ChatCompletionToolChoiceOption {
None,
Auto,
Required,
Named(ChatCompletionNamedToolChoice),
}
Expand description
Controls which (if any) tool is called by the model.
none
means the model will not call any tool and instead generates a message.
auto
means the model can pick between generating a message or calling one or more tools.
required
means the model must call one or more tools.
Specifying a particular tool via {"type": "function", "function": {"name": "my_function"}}
forces the model to call that tool.
none
is the default when no tools are present. auto
is the default if tools are present.present.
Variants§
Trait Implementations§
Source§impl Clone for ChatCompletionToolChoiceOption
impl Clone for ChatCompletionToolChoiceOption
Source§fn clone(&self) -> ChatCompletionToolChoiceOption
fn clone(&self) -> ChatCompletionToolChoiceOption
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 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
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for ChatCompletionToolChoiceOption
Auto Trait Implementations§
impl Freeze for ChatCompletionToolChoiceOption
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