pub enum Tool {
Function(FunctionTool),
FileSearch(FileSearchTool),
ComputerUsePreview(ComputerUsePreviewTool),
WebSearch(WebSearchTool),
WebSearch20250826(WebSearchTool),
Mcp(MCPTool),
CodeInterpreter(CodeInterpreterTool),
ImageGeneration(ImageGenTool),
LocalShell,
Custom(CustomToolParam),
WebSearchPreview(WebSearchTool),
WebSearchPreview20250311(WebSearchTool),
}Expand description
Definitions for model-callable tools.
Variants§
Function(FunctionTool)
Defines a function in your own code the model can choose to call. Learn more about function calling.
FileSearch(FileSearchTool)
A tool that searches for relevant content from uploaded files. Learn more about the file search tool.
ComputerUsePreview(ComputerUsePreviewTool)
A tool that controls a virtual computer. Learn more about the computer use tool.
WebSearch(WebSearchTool)
Search the Internet for sources related to the prompt. Learn more about the web search tool.
WebSearch20250826(WebSearchTool)
type: web_search_2025_08_26
Mcp(MCPTool)
Give the model access to additional tools via remote Model Context Protocol (MCP) servers. Learn more about MCP.
CodeInterpreter(CodeInterpreterTool)
A tool that runs Python code to help generate a response to a prompt.
ImageGeneration(ImageGenTool)
A tool that generates images using a model like gpt-image-1.
LocalShell
A tool that allows the model to execute shell commands in a local environment.
Custom(CustomToolParam)
A custom tool that processes input using a specified format. Learn more about custom tools
WebSearchPreview(WebSearchTool)
This tool searches the web for relevant results to use in a response. Learn more about the web search tool.
WebSearchPreview20250311(WebSearchTool)
type: web_search_preview_2025_03_11