pub struct ToolChoiceTypes {
pub type_: ToolChoiceTypesType,
}Expand description
Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.
JSON schema
{
"title": "Hosted tool",
"description": "Indicates that the model should use a built-in tool to generate a response.\n[Learn more about built-in tools](/docs/guides/tools).\n",
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"description": "The type of hosted tool the model should to use. Learn more about\n[built-in tools](/docs/guides/tools).\n\nAllowed values are:\n- `file_search`\n- `web_search_preview`\n- `computer`\n- `computer_use_preview`\n- `computer_use`\n- `code_interpreter`\n- `image_generation`\n",
"type": "string",
"enum": [
"file_search",
"web_search_preview",
"computer",
"computer_use_preview",
"computer_use",
"web_search_preview_2025_03_11",
"image_generation",
"code_interpreter"
]
}
}
}Fields§
§type_: ToolChoiceTypesTypeThe type of hosted tool the model should to use. Learn more about built-in tools.
Allowed values are:
file_searchweb_search_previewcomputercomputer_use_previewcomputer_usecode_interpreterimage_generation
Trait Implementations§
Source§impl Clone for ToolChoiceTypes
impl Clone for ToolChoiceTypes
Source§fn clone(&self) -> ToolChoiceTypes
fn clone(&self) -> ToolChoiceTypes
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 moreSource§impl Debug for ToolChoiceTypes
impl Debug for ToolChoiceTypes
Source§impl<'de> Deserialize<'de> for ToolChoiceTypes
impl<'de> Deserialize<'de> for ToolChoiceTypes
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 From<ToolChoiceTypes> for ToolChoiceParam
impl From<ToolChoiceTypes> for ToolChoiceParam
Source§fn from(value: ToolChoiceTypes) -> Self
fn from(value: ToolChoiceTypes) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ToolChoiceTypes
impl RefUnwindSafe for ToolChoiceTypes
impl Send for ToolChoiceTypes
impl Sync for ToolChoiceTypes
impl Unpin for ToolChoiceTypes
impl UnsafeUnpin for ToolChoiceTypes
impl UnwindSafe for ToolChoiceTypes
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