Interface BetaTool.Visitor
-
- All Implemented Interfaces:
public interface BetaTool.Visitor<T extends Object>
-
-
Method Summary
Modifier and Type Method Description abstract TvisitFunction(BetaFunctionTool function)Defines a function in your own code the model can choose to call. abstract TvisitFileSearch(BetaFileSearchTool fileSearch)A tool that searches for relevant content from uploaded files. abstract TvisitComputer(BetaComputerTool computer)A tool that controls a virtual computer. abstract TvisitComputerUsePreview(BetaComputerUsePreviewTool computerUsePreview)A tool that controls a virtual computer. abstract TvisitWebSearch(BetaWebSearchTool webSearch)Search the Internet for sources related to the prompt. abstract TvisitMcp(BetaTool.Mcp mcp)Give the model access to additional tools via remote Model Context Protocol (MCP) servers. abstract TvisitCodeInterpreter(BetaTool.CodeInterpreter codeInterpreter)A tool that runs Python code to help generate a response to a prompt. abstract TvisitProgrammaticToolCalling(JsonValue programmaticToolCalling)abstract TvisitImageGeneration(BetaTool.ImageGeneration imageGeneration)A tool that generates images using the GPT image models. abstract TvisitLocalShell(JsonValue localShell)A tool that allows the model to execute shell commands in a local environment. abstract TvisitShell(BetaFunctionShellTool shell)A tool that allows the model to execute shell commands. abstract TvisitCustom(BetaCustomTool custom)A custom tool that processes input using a specified format. abstract TvisitNamespace(BetaNamespaceTool namespace)Groups function/custom tools under a shared namespace. abstract TvisitToolSearch(BetaToolSearchTool toolSearch)Hosted or BYOT tool search configuration for deferred tools. abstract TvisitWebSearchPreview(BetaWebSearchPreviewTool webSearchPreview)This tool searches the web for relevant results to use in a response. abstract TvisitApplyPatch(BetaApplyPatchTool applyPatch)Allows the assistant to create, delete, or update files using unified diffs. Tunknown(JsonValue json)Maps an unknown variant of BetaTool to a value of type T. -
-
Method Detail
-
visitFunction
abstract T visitFunction(BetaFunctionTool function)
Defines a function in your own code the model can choose to call. Learn more about function calling.
-
visitFileSearch
abstract T visitFileSearch(BetaFileSearchTool fileSearch)
A tool that searches for relevant content from uploaded files. Learn more about the file search tool.
-
visitComputer
abstract T visitComputer(BetaComputerTool computer)
A tool that controls a virtual computer. Learn more about the computer tool.
-
visitComputerUsePreview
abstract T visitComputerUsePreview(BetaComputerUsePreviewTool computerUsePreview)
A tool that controls a virtual computer. Learn more about the computer tool.
-
visitWebSearch
abstract T visitWebSearch(BetaWebSearchTool webSearch)
Search the Internet for sources related to the prompt. Learn more about the web search tool.
-
visitMcp
abstract T visitMcp(BetaTool.Mcp mcp)
Give the model access to additional tools via remote Model Context Protocol (MCP) servers. Learn more about MCP.
-
visitCodeInterpreter
abstract T visitCodeInterpreter(BetaTool.CodeInterpreter codeInterpreter)
A tool that runs Python code to help generate a response to a prompt.
-
visitProgrammaticToolCalling
abstract T visitProgrammaticToolCalling(JsonValue programmaticToolCalling)
-
visitImageGeneration
abstract T visitImageGeneration(BetaTool.ImageGeneration imageGeneration)
A tool that generates images using the GPT image models.
-
visitLocalShell
abstract T visitLocalShell(JsonValue localShell)
A tool that allows the model to execute shell commands in a local environment.
-
visitShell
abstract T visitShell(BetaFunctionShellTool shell)
A tool that allows the model to execute shell commands.
-
visitCustom
abstract T visitCustom(BetaCustomTool custom)
A custom tool that processes input using a specified format. Learn more about custom tools
-
visitNamespace
abstract T visitNamespace(BetaNamespaceTool namespace)
Groups function/custom tools under a shared namespace.
-
visitToolSearch
abstract T visitToolSearch(BetaToolSearchTool toolSearch)
Hosted or BYOT tool search configuration for deferred tools.
-
visitWebSearchPreview
abstract T visitWebSearchPreview(BetaWebSearchPreviewTool webSearchPreview)
This tool searches the web for relevant results to use in a response. Learn more about the web search tool.
-
visitApplyPatch
abstract T visitApplyPatch(BetaApplyPatchTool applyPatch)
Allows the assistant to create, delete, or update files using unified diffs.
-
unknown
T unknown(JsonValue json)
Maps an unknown variant of BetaTool to a value of type T.
An instance of BetaTool can contain an unknown variant if it was deserialized from data that doesn't match any known variant. For example, if the SDK is on an older version than the API, then the API may respond with new variants that the SDK is unaware of.
-
-
-
-