pub enum ToolChoiceOptions {
None,
Auto,
Required,
}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.
JSON schema
{
"title": "Tool choice mode",
"description": "Controls which (if any) tool is called by the model.\n\n`none` means the model will not call any tool and instead generates a message.\n\n`auto` means the model can pick between generating a message or calling one or\nmore tools.\n\n`required` means the model must call one or more tools.\n",
"type": "string",
"enum": [
"none",
"auto",
"required"
]
}Variants§
Trait Implementations§
Source§impl Clone for ToolChoiceOptions
impl Clone for ToolChoiceOptions
Source§fn clone(&self) -> ToolChoiceOptions
fn clone(&self) -> ToolChoiceOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ToolChoiceOptions
Source§impl Debug for ToolChoiceOptions
impl Debug for ToolChoiceOptions
Source§impl<'de> Deserialize<'de> for ToolChoiceOptions
impl<'de> Deserialize<'de> for ToolChoiceOptions
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 Display for ToolChoiceOptions
impl Display for ToolChoiceOptions
impl Eq for ToolChoiceOptions
Source§impl From<ToolChoiceOptions> for RealtimeBetaResponseCreateParamsToolChoice
impl From<ToolChoiceOptions> for RealtimeBetaResponseCreateParamsToolChoice
Source§fn from(value: ToolChoiceOptions) -> Self
fn from(value: ToolChoiceOptions) -> Self
Converts to this type from the input type.
Source§impl From<ToolChoiceOptions> for RealtimeResponseCreateParamsToolChoice
impl From<ToolChoiceOptions> for RealtimeResponseCreateParamsToolChoice
Source§fn from(value: ToolChoiceOptions) -> Self
fn from(value: ToolChoiceOptions) -> Self
Converts to this type from the input type.
Source§impl From<ToolChoiceOptions> for RealtimeSessionCreateRequestGaToolChoice
impl From<ToolChoiceOptions> for RealtimeSessionCreateRequestGaToolChoice
Source§fn from(value: ToolChoiceOptions) -> Self
fn from(value: ToolChoiceOptions) -> Self
Converts to this type from the input type.
Source§impl From<ToolChoiceOptions> for RealtimeSessionCreateResponseGaToolChoice
impl From<ToolChoiceOptions> for RealtimeSessionCreateResponseGaToolChoice
Source§fn from(value: ToolChoiceOptions) -> Self
fn from(value: ToolChoiceOptions) -> Self
Converts to this type from the input type.
Source§impl From<ToolChoiceOptions> for ToolChoiceParam
impl From<ToolChoiceOptions> for ToolChoiceParam
Source§fn from(value: ToolChoiceOptions) -> Self
fn from(value: ToolChoiceOptions) -> Self
Converts to this type from the input type.
Source§impl FromStr for ToolChoiceOptions
impl FromStr for ToolChoiceOptions
Source§impl Hash for ToolChoiceOptions
impl Hash for ToolChoiceOptions
Source§impl Ord for ToolChoiceOptions
impl Ord for ToolChoiceOptions
Source§fn cmp(&self, other: &ToolChoiceOptions) -> Ordering
fn cmp(&self, other: &ToolChoiceOptions) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ToolChoiceOptions
impl PartialEq for ToolChoiceOptions
Source§impl PartialOrd for ToolChoiceOptions
impl PartialOrd for ToolChoiceOptions
Source§impl Serialize for ToolChoiceOptions
impl Serialize for ToolChoiceOptions
impl StructuralPartialEq for ToolChoiceOptions
Source§impl TryFrom<&String> for ToolChoiceOptions
impl TryFrom<&String> for ToolChoiceOptions
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<&str> for ToolChoiceOptions
impl TryFrom<&str> for ToolChoiceOptions
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<String> for ToolChoiceOptions
impl TryFrom<String> for ToolChoiceOptions
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for ToolChoiceOptions
impl RefUnwindSafe for ToolChoiceOptions
impl Send for ToolChoiceOptions
impl Sync for ToolChoiceOptions
impl Unpin for ToolChoiceOptions
impl UnsafeUnpin for ToolChoiceOptions
impl UnwindSafe for ToolChoiceOptions
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