Interface BetaResponseOutputItem.Visitor
-
- All Implemented Interfaces:
public interface BetaResponseOutputItem.Visitor<T extends Object>An interface that defines how to map each variant of BetaResponseOutputItem to a value of type T.
-
-
Method Summary
Modifier and Type Method Description abstract TvisitMessage(BetaResponseOutputMessage message)An output message from the model. abstract TvisitFileSearchCall(BetaResponseFileSearchToolCall fileSearchCall)The results of a file search tool call. abstract TvisitFunctionCall(BetaResponseFunctionToolCall functionCall)A tool call to run a function. abstract TvisitFunctionCallOutput(BetaResponseFunctionToolCallOutputItem functionCallOutput)abstract TvisitAgentMessage(BetaResponseOutputItem.AgentMessage agentMessage)abstract TvisitMultiAgentCall(BetaResponseOutputItem.MultiAgentCall multiAgentCall)abstract TvisitMultiAgentCallOutput(BetaResponseOutputItem.MultiAgentCallOutput multiAgentCallOutput)abstract TvisitWebSearchCall(BetaResponseFunctionWebSearch webSearchCall)The results of a web search tool call. abstract TvisitComputerCall(BetaResponseComputerToolCall computerCall)A tool call to a computer use tool. abstract TvisitComputerCallOutput(BetaResponseComputerToolCallOutputItem computerCallOutput)abstract TvisitReasoning(BetaResponseReasoningItem reasoning)A description of the chain of thought used by a reasoning model while generating a response. abstract TvisitProgram(BetaResponseOutputItem.Program program)abstract TvisitProgramOutput(BetaResponseOutputItem.ProgramOutput programOutput)abstract TvisitToolSearchCall(BetaResponseToolSearchCall toolSearchCall)abstract TvisitToolSearchOutput(BetaResponseToolSearchOutputItem toolSearchOutput)abstract TvisitAdditionalTools(BetaResponseOutputItem.AdditionalTools additionalTools)abstract TvisitCompaction(BetaResponseCompactionItem compaction)A compaction item generated by the v1/responses/compactAPI.abstract TvisitImageGenerationCall(BetaResponseOutputItem.ImageGenerationCall imageGenerationCall)An image generation request made by the model. abstract TvisitCodeInterpreterCall(BetaResponseCodeInterpreterToolCall codeInterpreterCall)A tool call to run code. abstract TvisitLocalShellCall(BetaResponseOutputItem.LocalShellCall localShellCall)A tool call to run a command on the local shell. abstract TvisitLocalShellCallOutput(BetaResponseOutputItem.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 TvisitMcpCall(BetaResponseOutputItem.McpCall mcpCall)An invocation of a tool on an MCP server. abstract TvisitMcpListTools(BetaResponseOutputItem.McpListTools mcpListTools)A list of tools available on an MCP server. abstract TvisitMcpApprovalRequest(BetaResponseOutputItem.McpApprovalRequest mcpApprovalRequest)A request for human approval of a tool invocation. abstract TvisitMcpApprovalResponse(BetaResponseOutputItem.McpApprovalResponse mcpApprovalResponse)A response to an MCP approval request. abstract TvisitCustomToolCall(BetaResponseCustomToolCall 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 BetaResponseOutputItem to a value of type T. -
-
Method Detail
-
visitMessage
abstract T visitMessage(BetaResponseOutputMessage message)
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.
-
visitFunctionCall
abstract T visitFunctionCall(BetaResponseFunctionToolCall 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(BetaResponseOutputItem.AgentMessage agentMessage)
-
visitMultiAgentCall
abstract T visitMultiAgentCall(BetaResponseOutputItem.MultiAgentCall multiAgentCall)
-
visitMultiAgentCallOutput
abstract T visitMultiAgentCallOutput(BetaResponseOutputItem.MultiAgentCallOutput multiAgentCallOutput)
-
visitWebSearchCall
abstract T visitWebSearchCall(BetaResponseFunctionWebSearch webSearchCall)
The results of a web search tool call. See the web 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)
-
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(BetaResponseOutputItem.Program program)
-
visitProgramOutput
abstract T visitProgramOutput(BetaResponseOutputItem.ProgramOutput programOutput)
-
visitToolSearchCall
abstract T visitToolSearchCall(BetaResponseToolSearchCall toolSearchCall)
-
visitToolSearchOutput
abstract T visitToolSearchOutput(BetaResponseToolSearchOutputItem toolSearchOutput)
-
visitAdditionalTools
abstract T visitAdditionalTools(BetaResponseOutputItem.AdditionalTools additionalTools)
-
visitCompaction
abstract T visitCompaction(BetaResponseCompactionItem compaction)
A compaction item generated by the
v1/responses/compactAPI.
-
visitImageGenerationCall
abstract T visitImageGenerationCall(BetaResponseOutputItem.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(BetaResponseOutputItem.LocalShellCall localShellCall)
A tool call to run a command on the local shell.
-
visitLocalShellCallOutput
abstract T visitLocalShellCallOutput(BetaResponseOutputItem.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.
-
visitMcpCall
abstract T visitMcpCall(BetaResponseOutputItem.McpCall mcpCall)
An invocation of a tool on an MCP server.
-
visitMcpListTools
abstract T visitMcpListTools(BetaResponseOutputItem.McpListTools mcpListTools)
A list of tools available on an MCP server.
-
visitMcpApprovalRequest
abstract T visitMcpApprovalRequest(BetaResponseOutputItem.McpApprovalRequest mcpApprovalRequest)
A request for human approval of a tool invocation.
-
visitMcpApprovalResponse
abstract T visitMcpApprovalResponse(BetaResponseOutputItem.McpApprovalResponse mcpApprovalResponse)
A response to an MCP approval request.
-
visitCustomToolCall
abstract T visitCustomToolCall(BetaResponseCustomToolCall 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 BetaResponseOutputItem to a value of type T.
An instance of BetaResponseOutputItem 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.
-
-
-
-