Interface BetaResponseItem.Visitor
-
- All Implemented Interfaces:
public interface BetaResponseItem.Visitor<T extends Object>An interface that defines how to map each variant of BetaResponseItem to a value of type T.
-
-
Method Summary
Modifier and Type Method Description abstract TvisitBetaResponseInputMessageItem(BetaResponseInputMessageItem betaResponseInputMessageItem)abstract TvisitBetaResponseOutputMessage(BetaResponseOutputMessage betaResponseOutputMessage)An output message from the model. abstract TvisitFileSearchCall(BetaResponseFileSearchToolCall fileSearchCall)The results of a file search tool call. abstract TvisitComputerCall(BetaResponseComputerToolCall computerCall)A tool call to a computer use tool. abstract TvisitComputerCallOutput(BetaResponseComputerToolCallOutputItem computerCallOutput)abstract TvisitWebSearchCall(BetaResponseFunctionWebSearch webSearchCall)The results of a web search tool call. abstract TvisitFunctionCall(BetaResponseFunctionToolCallItem functionCall)A tool call to run a function. abstract TvisitFunctionCallOutput(BetaResponseFunctionToolCallOutputItem functionCallOutput)abstract TvisitAgentMessage(BetaResponseItem.AgentMessage agentMessage)abstract TvisitMultiAgentCall(BetaResponseItem.MultiAgentCall multiAgentCall)abstract TvisitMultiAgentCallOutput(BetaResponseItem.MultiAgentCallOutput multiAgentCallOutput)abstract TvisitToolSearchCall(BetaResponseToolSearchCall toolSearchCall)abstract TvisitToolSearchOutput(BetaResponseToolSearchOutputItem toolSearchOutput)abstract TvisitAdditionalTools(BetaResponseItem.AdditionalTools additionalTools)abstract TvisitReasoning(BetaResponseReasoningItem reasoning)A description of the chain of thought used by a reasoning model while generating a response. abstract TvisitProgram(BetaResponseItem.Program program)abstract TvisitProgramOutput(BetaResponseItem.ProgramOutput programOutput)abstract TvisitCompaction(BetaResponseCompactionItem compaction)A compaction item generated by the v1/responses/compactAPI.abstract TvisitImageGenerationCall(BetaResponseItem.ImageGenerationCall imageGenerationCall)An image generation request made by the model. abstract TvisitCodeInterpreterCall(BetaResponseCodeInterpreterToolCall codeInterpreterCall)A tool call to run code. abstract TvisitLocalShellCall(BetaResponseItem.LocalShellCall localShellCall)A tool call to run a command on the local shell. abstract TvisitLocalShellCallOutput(BetaResponseItem.LocalShellCallOutput localShellCallOutput)The output of a local shell tool call. abstract TvisitShellCall(BetaResponseFunctionShellToolCall shellCall)A tool call that executes one or more shell commands in a managed environment. abstract TvisitShellCallOutput(BetaResponseFunctionShellToolCallOutput shellCallOutput)The output of a shell tool call that was emitted. abstract TvisitApplyPatchCall(BetaResponseApplyPatchToolCall applyPatchCall)A tool call that applies file diffs by creating, deleting, or updating files. abstract TvisitApplyPatchCallOutput(BetaResponseApplyPatchToolCallOutput applyPatchCallOutput)The output emitted by an apply patch tool call. abstract TvisitMcpListTools(BetaResponseItem.McpListTools mcpListTools)A list of tools available on an MCP server. abstract TvisitMcpApprovalRequest(BetaResponseItem.McpApprovalRequest mcpApprovalRequest)A request for human approval of a tool invocation. abstract TvisitMcpApprovalResponse(BetaResponseItem.McpApprovalResponse mcpApprovalResponse)A response to an MCP approval request. abstract TvisitMcpCall(BetaResponseItem.McpCall mcpCall)An invocation of a tool on an MCP server. abstract TvisitCustomToolCall(BetaResponseCustomToolCallItem customToolCall)A call to a custom tool created by the model. abstract TvisitCustomToolCallOutput(BetaResponseCustomToolCallOutputItem customToolCallOutput)The output of a custom tool call from your code, being sent back to the model. Tunknown(JsonValue json)Maps an unknown variant of BetaResponseItem to a value of type T. -
-
Method Detail
-
visitBetaResponseInputMessageItem
abstract T visitBetaResponseInputMessageItem(BetaResponseInputMessageItem betaResponseInputMessageItem)
-
visitBetaResponseOutputMessage
abstract T visitBetaResponseOutputMessage(BetaResponseOutputMessage betaResponseOutputMessage)
An output message from the model.
-
visitFileSearchCall
abstract T visitFileSearchCall(BetaResponseFileSearchToolCall fileSearchCall)
The results of a file search tool call. See the file search guide for more information.
-
visitComputerCall
abstract T visitComputerCall(BetaResponseComputerToolCall computerCall)
A tool call to a computer use tool. See the computer use guide for more information.
-
visitComputerCallOutput
abstract T visitComputerCallOutput(BetaResponseComputerToolCallOutputItem computerCallOutput)
-
visitWebSearchCall
abstract T visitWebSearchCall(BetaResponseFunctionWebSearch webSearchCall)
The results of a web search tool call. See the web search guide for more information.
-
visitFunctionCall
abstract T visitFunctionCall(BetaResponseFunctionToolCallItem functionCall)
A tool call to run a function. See the function calling guide for more information.
-
visitFunctionCallOutput
abstract T visitFunctionCallOutput(BetaResponseFunctionToolCallOutputItem functionCallOutput)
-
visitAgentMessage
abstract T visitAgentMessage(BetaResponseItem.AgentMessage agentMessage)
-
visitMultiAgentCall
abstract T visitMultiAgentCall(BetaResponseItem.MultiAgentCall multiAgentCall)
-
visitMultiAgentCallOutput
abstract T visitMultiAgentCallOutput(BetaResponseItem.MultiAgentCallOutput multiAgentCallOutput)
-
visitToolSearchCall
abstract T visitToolSearchCall(BetaResponseToolSearchCall toolSearchCall)
-
visitToolSearchOutput
abstract T visitToolSearchOutput(BetaResponseToolSearchOutputItem toolSearchOutput)
-
visitAdditionalTools
abstract T visitAdditionalTools(BetaResponseItem.AdditionalTools additionalTools)
-
visitReasoning
abstract T visitReasoning(BetaResponseReasoningItem reasoning)
A description of the chain of thought used by a reasoning model while generating a response. Be sure to include these items in your
inputto the Responses API for subsequent turns of a conversation if you are manually managing context.
-
visitProgram
abstract T visitProgram(BetaResponseItem.Program program)
-
visitProgramOutput
abstract T visitProgramOutput(BetaResponseItem.ProgramOutput programOutput)
-
visitCompaction
abstract T visitCompaction(BetaResponseCompactionItem compaction)
A compaction item generated by the
v1/responses/compactAPI.
-
visitImageGenerationCall
abstract T visitImageGenerationCall(BetaResponseItem.ImageGenerationCall imageGenerationCall)
An image generation request made by the model.
-
visitCodeInterpreterCall
abstract T visitCodeInterpreterCall(BetaResponseCodeInterpreterToolCall codeInterpreterCall)
A tool call to run code.
-
visitLocalShellCall
abstract T visitLocalShellCall(BetaResponseItem.LocalShellCall localShellCall)
A tool call to run a command on the local shell.
-
visitLocalShellCallOutput
abstract T visitLocalShellCallOutput(BetaResponseItem.LocalShellCallOutput localShellCallOutput)
The output of a local shell tool call.
-
visitShellCall
abstract T visitShellCall(BetaResponseFunctionShellToolCall shellCall)
A tool call that executes one or more shell commands in a managed environment.
-
visitShellCallOutput
abstract T visitShellCallOutput(BetaResponseFunctionShellToolCallOutput shellCallOutput)
The output of a shell tool call that was emitted.
-
visitApplyPatchCall
abstract T visitApplyPatchCall(BetaResponseApplyPatchToolCall applyPatchCall)
A tool call that applies file diffs by creating, deleting, or updating files.
-
visitApplyPatchCallOutput
abstract T visitApplyPatchCallOutput(BetaResponseApplyPatchToolCallOutput applyPatchCallOutput)
The output emitted by an apply patch tool call.
-
visitMcpListTools
abstract T visitMcpListTools(BetaResponseItem.McpListTools mcpListTools)
A list of tools available on an MCP server.
-
visitMcpApprovalRequest
abstract T visitMcpApprovalRequest(BetaResponseItem.McpApprovalRequest mcpApprovalRequest)
A request for human approval of a tool invocation.
-
visitMcpApprovalResponse
abstract T visitMcpApprovalResponse(BetaResponseItem.McpApprovalResponse mcpApprovalResponse)
A response to an MCP approval request.
-
visitMcpCall
abstract T visitMcpCall(BetaResponseItem.McpCall mcpCall)
An invocation of a tool on an MCP server.
-
visitCustomToolCall
abstract T visitCustomToolCall(BetaResponseCustomToolCallItem customToolCall)
A call to a custom tool created by the model.
-
visitCustomToolCallOutput
abstract T visitCustomToolCallOutput(BetaResponseCustomToolCallOutputItem customToolCallOutput)
The output of a custom tool call from your code, being sent back to the model.
-
unknown
T unknown(JsonValue json)
Maps an unknown variant of BetaResponseItem to a value of type T.
An instance of BetaResponseItem 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.
-
-
-
-