pub enum AssistantsApiToolChoiceOption {
None,
Auto,
Required,
Named(AssistantsNamedToolChoice),
}
Expand description
Controls which (if any) tool is called by the model.
none
means the model will not call any tools and instead generates a message.
auto
is the default value and 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 before responding to the user.
Specifying a particular tool like {"type": "file_search"}
or {"type": "function", "function": {"name": "my_function"}}
forces the model to call that tool.
Variants§
Trait Implementations§
Source§impl Clone for AssistantsApiToolChoiceOption
impl Clone for AssistantsApiToolChoiceOption
Source§fn clone(&self) -> AssistantsApiToolChoiceOption
fn clone(&self) -> AssistantsApiToolChoiceOption
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 AssistantsApiToolChoiceOption
impl Default for AssistantsApiToolChoiceOption
Source§fn default() -> AssistantsApiToolChoiceOption
fn default() -> AssistantsApiToolChoiceOption
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AssistantsApiToolChoiceOption
impl<'de> Deserialize<'de> for AssistantsApiToolChoiceOption
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 AssistantsApiToolChoiceOption
impl PartialEq for AssistantsApiToolChoiceOption
Source§fn eq(&self, other: &AssistantsApiToolChoiceOption) -> bool
fn eq(&self, other: &AssistantsApiToolChoiceOption) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for AssistantsApiToolChoiceOption
Auto Trait Implementations§
impl Freeze for AssistantsApiToolChoiceOption
impl RefUnwindSafe for AssistantsApiToolChoiceOption
impl Send for AssistantsApiToolChoiceOption
impl Sync for AssistantsApiToolChoiceOption
impl Unpin for AssistantsApiToolChoiceOption
impl UnwindSafe for AssistantsApiToolChoiceOption
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