Interface ResponseInputItem.Visitor
- 
                    
                    - All Implemented Interfaces:
 
 public interface ResponseInputItem.Visitor<T extends Object>An interface that defines how to map each variant of ResponseInputItem to a value of type T. 
- 
                
                    
                    - 
                                
                            
                                Method SummaryModifier and Type Method Description abstract TvisitEasyInputMessage(EasyInputMessage easyInputMessage)A message input to the model with a role indicating instruction following hierarchy. abstract TvisitMessage(ResponseInputItem.Message message)A message input to the model with a role indicating instruction following hierarchy. abstract TvisitResponseOutputMessage(ResponseOutputMessage responseOutputMessage)An output message from the model. abstract TvisitFileSearchCall(ResponseFileSearchToolCall fileSearchCall)The results of a file search tool call. abstract TvisitComputerCall(ResponseComputerToolCall computerCall)A tool call to a computer use tool. abstract TvisitComputerCallOutput(ResponseInputItem.ComputerCallOutput computerCallOutput)The output of a computer tool call. abstract TvisitWebSearchCall(ResponseFunctionWebSearch webSearchCall)The results of a web search tool call. abstract TvisitFunctionCall(ResponseFunctionToolCall functionCall)A tool call to run a function. abstract TvisitFunctionCallOutput(ResponseInputItem.FunctionCallOutput functionCallOutput)The output of a function tool call. abstract TvisitReasoning(ResponseReasoningItem reasoning)A description of the chain of thought used by a reasoning model while generating a response. abstract TvisitImageGenerationCall(ResponseInputItem.ImageGenerationCall imageGenerationCall)An image generation request made by the model. abstract TvisitCodeInterpreterCall(ResponseCodeInterpreterToolCall codeInterpreterCall)A tool call to run code. abstract TvisitLocalShellCall(ResponseInputItem.LocalShellCall localShellCall)A tool call to run a command on the local shell. abstract TvisitLocalShellCallOutput(ResponseInputItem.LocalShellCallOutput localShellCallOutput)The output of a local shell tool call. abstract TvisitMcpListTools(ResponseInputItem.McpListTools mcpListTools)A list of tools available on an MCP server. abstract TvisitMcpApprovalRequest(ResponseInputItem.McpApprovalRequest mcpApprovalRequest)A request for human approval of a tool invocation. abstract TvisitMcpApprovalResponse(ResponseInputItem.McpApprovalResponse mcpApprovalResponse)A response to an MCP approval request. abstract TvisitMcpCall(ResponseInputItem.McpCall mcpCall)An invocation of a tool on an MCP server. abstract TvisitCustomToolCallOutput(ResponseCustomToolCallOutput customToolCallOutput)The output of a custom tool call from your code, being sent back to the model. abstract TvisitCustomToolCall(ResponseCustomToolCall customToolCall)A call to a custom tool created by the model. abstract TvisitItemReference(ResponseInputItem.ItemReference itemReference)An internal identifier for an item to reference. Tunknown(JsonValue json)Maps an unknown variant of ResponseInputItem to a value of type T. - 
                    
                    
                    - 
                                
                            
                                Method Detail- 
                                        visitEasyInputMessageabstract T visitEasyInputMessage(EasyInputMessage easyInputMessage) 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.
 - 
                                        visitMessageabstract T visitMessage(ResponseInputItem.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.
 - 
                                        visitResponseOutputMessageabstract T visitResponseOutputMessage(ResponseOutputMessage responseOutputMessage) An output message from the model. 
 - 
                                        visitFileSearchCallabstract T visitFileSearchCall(ResponseFileSearchToolCall fileSearchCall) The results of a file search tool call. See the file search guide for more information. 
 - 
                                        visitComputerCallabstract T visitComputerCall(ResponseComputerToolCall computerCall) A tool call to a computer use tool. See the computer use guide for more information. 
 - 
                                        visitComputerCallOutputabstract T visitComputerCallOutput(ResponseInputItem.ComputerCallOutput computerCallOutput) The output of a computer tool call. 
 - 
                                        visitWebSearchCallabstract T visitWebSearchCall(ResponseFunctionWebSearch webSearchCall) The results of a web search tool call. See the web search guide for more information. 
 - 
                                        visitFunctionCallabstract T visitFunctionCall(ResponseFunctionToolCall functionCall) A tool call to run a function. See the function calling guide for more information. 
 - 
                                        visitFunctionCallOutputabstract T visitFunctionCallOutput(ResponseInputItem.FunctionCallOutput functionCallOutput) The output of a function tool call. 
 - 
                                        visitReasoningabstract T visitReasoning(ResponseReasoningItem 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.
 - 
                                        visitImageGenerationCallabstract T visitImageGenerationCall(ResponseInputItem.ImageGenerationCall imageGenerationCall) An image generation request made by the model. 
 - 
                                        visitCodeInterpreterCallabstract T visitCodeInterpreterCall(ResponseCodeInterpreterToolCall codeInterpreterCall) A tool call to run code. 
 - 
                                        visitLocalShellCallabstract T visitLocalShellCall(ResponseInputItem.LocalShellCall localShellCall) A tool call to run a command on the local shell. 
 - 
                                        visitLocalShellCallOutputabstract T visitLocalShellCallOutput(ResponseInputItem.LocalShellCallOutput localShellCallOutput) The output of a local shell tool call. 
 - 
                                        visitMcpListToolsabstract T visitMcpListTools(ResponseInputItem.McpListTools mcpListTools) A list of tools available on an MCP server. 
 - 
                                        visitMcpApprovalRequestabstract T visitMcpApprovalRequest(ResponseInputItem.McpApprovalRequest mcpApprovalRequest) A request for human approval of a tool invocation. 
 - 
                                        visitMcpApprovalResponseabstract T visitMcpApprovalResponse(ResponseInputItem.McpApprovalResponse mcpApprovalResponse) A response to an MCP approval request. 
 - 
                                        visitMcpCallabstract T visitMcpCall(ResponseInputItem.McpCall mcpCall) An invocation of a tool on an MCP server. 
 - 
                                        visitCustomToolCallOutputabstract T visitCustomToolCallOutput(ResponseCustomToolCallOutput customToolCallOutput) The output of a custom tool call from your code, being sent back to the model. 
 - 
                                        visitCustomToolCallabstract T visitCustomToolCall(ResponseCustomToolCall customToolCall) A call to a custom tool created by the model. 
 - 
                                        visitItemReferenceabstract T visitItemReference(ResponseInputItem.ItemReference itemReference) An internal identifier for an item to reference. 
 - 
                                        unknownT unknown(JsonValue json) Maps an unknown variant of ResponseInputItem to a value of type T. An instance of ResponseInputItem 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. 
 
- 
                                        
 
- 
                                
                            
                                
 
- 
                    
                    
                    
 
-