pub enum ToolChoiceParam {
AllowedTools(ToolChoiceAllowed),
Function(ToolChoiceFunction),
Mcp(ToolChoiceMCP),
Custom(ToolChoiceCustom),
Hosted(ToolChoiceTypes),
Mode(ToolChoiceOptions),
}Variants§
AllowedTools(ToolChoiceAllowed)
Constrains the tools available to the model to a pre-defined set.
Function(ToolChoiceFunction)
Use this option to force the model to call a specific function.
Mcp(ToolChoiceMCP)
Use this option to force the model to call a specific tool on a remote MCP server.
Custom(ToolChoiceCustom)
Use this option to force the model to call a custom tool.
Hosted(ToolChoiceTypes)
Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.
Mode(ToolChoiceOptions)
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.
Trait Implementations§
Source§impl Clone for ToolChoiceParam
impl Clone for ToolChoiceParam
Source§fn clone(&self) -> ToolChoiceParam
fn clone(&self) -> ToolChoiceParam
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 Debug for ToolChoiceParam
impl Debug for ToolChoiceParam
Source§impl<'de> Deserialize<'de> for ToolChoiceParam
impl<'de> Deserialize<'de> for ToolChoiceParam
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 ToolChoiceParam
impl PartialEq for ToolChoiceParam
Source§impl Serialize for ToolChoiceParam
impl Serialize for ToolChoiceParam
impl StructuralPartialEq for ToolChoiceParam
Auto Trait Implementations§
impl Freeze for ToolChoiceParam
impl RefUnwindSafe for ToolChoiceParam
impl Send for ToolChoiceParam
impl Sync for ToolChoiceParam
impl Unpin for ToolChoiceParam
impl UnwindSafe for ToolChoiceParam
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