pub enum ChatCompletionToolChoiceOption {
String(ChatCompletionToolChoiceStrEnum),
VariantNamedToolChoice(ChatCompletionNamedToolChoice),
}
Expand description
§on openapi.yaml
ChatCompletionToolChoiceOption:
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.
oneOf:
- type: string
description: >
`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.
enum:
- none
- auto
- required
- $ref: "#/components/schemas/ChatCompletionNamedToolChoice"
Variants§
String(ChatCompletionToolChoiceStrEnum)
Str
VariantNamedToolChoice(ChatCompletionNamedToolChoice)
Named tool choice variant for specific tool selection
Trait Implementations§
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
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