pub enum ToolChoiceParam {
AllowedTools(ToolChoiceAllowed),
Function(ToolChoiceFunction),
Mcp(ToolChoiceMCP),
Custom(ToolChoiceCustom),
ApplyPatch,
Shell,
Hosted(ToolChoiceTypes),
Mode(ToolChoiceOptions),
}response-types only.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.
ApplyPatch
Forces the model to call the apply_patch tool when executing a tool call.
Shell
Forces the model to call the function shell tool when a tool call is required.
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
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more