Interface BetaResponseInputItem.Visitor
-
- All Implemented Interfaces:
public interface BetaResponseInputItem.Visitor<T extends Object>An interface that defines how to map each variant of BetaResponseInputItem to a value of type T.
-
-
Method Summary
Modifier and Type Method Description abstract TvisitBetaEasyInputMessage(BetaEasyInputMessage betaEasyInputMessage)A message input to the model with a role indicating instruction following hierarchy. abstract TvisitMessage(BetaResponseInputItem.Message message)A message input to the model with a role indicating instruction following hierarchy. 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(BetaResponseInputItem.ComputerCallOutput computerCallOutput)The output of a computer tool call. abstract TvisitWebSearchCall(BetaResponseFunctionWebSearch webSearchCall)The results of a web search tool call. abstract TvisitFunctionCall(BetaResponseFunctionToolCall functionCall)A tool call to run a function. abstract TvisitFunctionCallOutput(BetaResponseInputItem.FunctionCallOutput functionCallOutput)The output of a function tool call. abstract TvisitAgentMessage(BetaResponseInputItem.AgentMessage agentMessage)A message routed between agents. abstract TvisitMultiAgentCall(BetaResponseInputItem.MultiAgentCall multiAgentCall)abstract TvisitMultiAgentCallOutput(BetaResponseInputItem.MultiAgentCallOutput multiAgentCallOutput)abstract TvisitToolSearchCall(BetaResponseInputItem.ToolSearchCall toolSearchCall)abstract TvisitToolSearchOutput(BetaResponseToolSearchOutputItemParam toolSearchOutput)abstract TvisitAdditionalTools(BetaResponseInputItem.AdditionalTools additionalTools)abstract TvisitReasoning(BetaResponseReasoningItem reasoning)A description of the chain of thought used by a reasoning model while generating a response. abstract TvisitCompaction(BetaResponseCompactionItemParam compaction)A compaction item generated by the v1/responses/compactAPI.abstract TvisitImageGenerationCall(BetaResponseInputItem.ImageGenerationCall imageGenerationCall)An image generation request made by the model. abstract TvisitCodeInterpreterCall(BetaResponseCodeInterpreterToolCall codeInterpreterCall)A tool call to run code. abstract TvisitLocalShellCall(BetaResponseInputItem.LocalShellCall localShellCall)A tool call to run a command on the local shell. abstract TvisitLocalShellCallOutput(BetaResponseInputItem.LocalShellCallOutput localShellCallOutput)The output of a local shell tool call. abstract TvisitShellCall(BetaResponseInputItem.ShellCall shellCall)A tool representing a request to execute one or more shell commands. abstract TvisitShellCallOutput(BetaResponseInputItem.ShellCallOutput shellCallOutput)The streamed output items emitted by a shell tool call. abstract TvisitApplyPatchCall(BetaResponseInputItem.ApplyPatchCall applyPatchCall)A tool call representing a request to create, delete, or update files using diff patches. abstract TvisitApplyPatchCallOutput(BetaResponseInputItem.ApplyPatchCallOutput applyPatchCallOutput)The streamed output emitted by an apply patch tool call. abstract TvisitMcpListTools(BetaResponseInputItem.McpListTools mcpListTools)A list of tools available on an MCP server. abstract TvisitMcpApprovalRequest(BetaResponseInputItem.McpApprovalRequest mcpApprovalRequest)A request for human approval of a tool invocation. abstract TvisitMcpApprovalResponse(BetaResponseInputItem.McpApprovalResponse mcpApprovalResponse)A response to an MCP approval request. abstract TvisitMcpCall(BetaResponseInputItem.McpCall mcpCall)An invocation of a tool on an MCP server. abstract TvisitCustomToolCallOutput(BetaResponseCustomToolCallOutput customToolCallOutput)The output of a custom tool call from your code, being sent back to the model. abstract TvisitCustomToolCall(BetaResponseCustomToolCall customToolCall)A call to a custom tool created by the model. abstract TvisitCompactionTrigger(BetaResponseInputItem.CompactionTrigger compactionTrigger)Compacts the current context. abstract TvisitItemReference(BetaResponseInputItem.ItemReference itemReference)An internal identifier for an item to reference. abstract TvisitProgram(BetaResponseInputItem.Program program)abstract TvisitProgramOutput(BetaResponseInputItem.ProgramOutput programOutput)Tunknown(JsonValue json)Maps an unknown variant of BetaResponseInputItem to a value of type T. -
-
Method Detail
-
visitBetaEasyInputMessage
abstract T visitBetaEasyInputMessage(BetaEasyInputMessage betaEasyInputMessage)
A message input to the model with a role indicating instruction following hierarchy. Instructions given with the
developerorsystemrole take precedence over instructions given with theuserrole. Messages with theassistantrole are presumed to have been generated by the model in previous interactions.
-
visitMessage
abstract T visitMessage(BetaResponseInputItem.Message message)
A message input to the model with a role indicating instruction following hierarchy. Instructions given with the
developerorsystemrole take precedence over instructions given with theuserrole.
-
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(BetaResponseInputItem.ComputerCallOutput computerCallOutput)
The output of a computer tool call.
-
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(BetaResponseFunctionToolCall functionCall)
A tool call to run a function. See the function calling guide for more information.
-
visitFunctionCallOutput
abstract T visitFunctionCallOutput(BetaResponseInputItem.FunctionCallOutput functionCallOutput)
The output of a function tool call.
-
visitAgentMessage
abstract T visitAgentMessage(BetaResponseInputItem.AgentMessage agentMessage)
A message routed between agents.
-
visitMultiAgentCall
abstract T visitMultiAgentCall(BetaResponseInputItem.MultiAgentCall multiAgentCall)
-
visitMultiAgentCallOutput
abstract T visitMultiAgentCallOutput(BetaResponseInputItem.MultiAgentCallOutput multiAgentCallOutput)
-
visitToolSearchCall
abstract T visitToolSearchCall(BetaResponseInputItem.ToolSearchCall toolSearchCall)
-
visitToolSearchOutput
abstract T visitToolSearchOutput(BetaResponseToolSearchOutputItemParam toolSearchOutput)
-
visitAdditionalTools
abstract T visitAdditionalTools(BetaResponseInputItem.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.
-
visitCompaction
abstract T visitCompaction(BetaResponseCompactionItemParam compaction)
A compaction item generated by the
v1/responses/compactAPI.
-
visitImageGenerationCall
abstract T visitImageGenerationCall(BetaResponseInputItem.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(BetaResponseInputItem.LocalShellCall localShellCall)
A tool call to run a command on the local shell.
-
visitLocalShellCallOutput
abstract T visitLocalShellCallOutput(BetaResponseInputItem.LocalShellCallOutput localShellCallOutput)
The output of a local shell tool call.
-
visitShellCall
abstract T visitShellCall(BetaResponseInputItem.ShellCall shellCall)
A tool representing a request to execute one or more shell commands.
-
visitShellCallOutput
abstract T visitShellCallOutput(BetaResponseInputItem.ShellCallOutput shellCallOutput)
The streamed output items emitted by a shell tool call.
-
visitApplyPatchCall
abstract T visitApplyPatchCall(BetaResponseInputItem.ApplyPatchCall applyPatchCall)
A tool call representing a request to create, delete, or update files using diff patches.
-
visitApplyPatchCallOutput
abstract T visitApplyPatchCallOutput(BetaResponseInputItem.ApplyPatchCallOutput applyPatchCallOutput)
The streamed output emitted by an apply patch tool call.
-
visitMcpListTools
abstract T visitMcpListTools(BetaResponseInputItem.McpListTools mcpListTools)
A list of tools available on an MCP server.
-
visitMcpApprovalRequest
abstract T visitMcpApprovalRequest(BetaResponseInputItem.McpApprovalRequest mcpApprovalRequest)
A request for human approval of a tool invocation.
-
visitMcpApprovalResponse
abstract T visitMcpApprovalResponse(BetaResponseInputItem.McpApprovalResponse mcpApprovalResponse)
A response to an MCP approval request.
-
visitMcpCall
abstract T visitMcpCall(BetaResponseInputItem.McpCall mcpCall)
An invocation of a tool on an MCP server.
-
visitCustomToolCallOutput
abstract T visitCustomToolCallOutput(BetaResponseCustomToolCallOutput customToolCallOutput)
The output of a custom tool call from your code, being sent back to the model.
-
visitCustomToolCall
abstract T visitCustomToolCall(BetaResponseCustomToolCall customToolCall)
A call to a custom tool created by the model.
-
visitCompactionTrigger
abstract T visitCompactionTrigger(BetaResponseInputItem.CompactionTrigger compactionTrigger)
Compacts the current context. Must be the final input item.
-
visitItemReference
abstract T visitItemReference(BetaResponseInputItem.ItemReference itemReference)
An internal identifier for an item to reference.
-
visitProgram
abstract T visitProgram(BetaResponseInputItem.Program program)
-
visitProgramOutput
abstract T visitProgramOutput(BetaResponseInputItem.ProgramOutput programOutput)
-
unknown
T unknown(JsonValue json)
Maps an unknown variant of BetaResponseInputItem to a value of type T.
An instance of BetaResponseInputItem 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.
-
-
-
-