Interface ResponseStreamEvent.Visitor
- 
                    
                    - All Implemented Interfaces:
 
 public interface ResponseStreamEvent.Visitor<T extends Object>An interface that defines how to map each variant of ResponseStreamEvent to a value of type T. 
- 
                
                    
                    - 
                                
                            
                                Method SummaryModifier and Type Method Description abstract TvisitAudioDelta(ResponseAudioDeltaEvent audioDelta)Emitted when there is a partial audio response. abstract TvisitAudioDone(ResponseAudioDoneEvent audioDone)Emitted when the audio response is complete. abstract TvisitAudioTranscriptDelta(ResponseAudioTranscriptDeltaEvent audioTranscriptDelta)Emitted when there is a partial transcript of audio. abstract TvisitAudioTranscriptDone(ResponseAudioTranscriptDoneEvent audioTranscriptDone)Emitted when the full audio transcript is completed. abstract TvisitCodeInterpreterCallCodeDelta(ResponseCodeInterpreterCallCodeDeltaEvent codeInterpreterCallCodeDelta)Emitted when a partial code snippet is streamed by the code interpreter. abstract TvisitCodeInterpreterCallCodeDone(ResponseCodeInterpreterCallCodeDoneEvent codeInterpreterCallCodeDone)Emitted when the code snippet is finalized by the code interpreter. abstract TvisitCodeInterpreterCallCompleted(ResponseCodeInterpreterCallCompletedEvent codeInterpreterCallCompleted)Emitted when the code interpreter call is completed. abstract TvisitCodeInterpreterCallInProgress(ResponseCodeInterpreterCallInProgressEvent codeInterpreterCallInProgress)Emitted when a code interpreter call is in progress. abstract TvisitCodeInterpreterCallInterpreting(ResponseCodeInterpreterCallInterpretingEvent codeInterpreterCallInterpreting)Emitted when the code interpreter is actively interpreting the code snippet. abstract TvisitCompleted(ResponseCompletedEvent completed)Emitted when the model response is complete. abstract TvisitContentPartAdded(ResponseContentPartAddedEvent contentPartAdded)Emitted when a new content part is added. abstract TvisitContentPartDone(ResponseContentPartDoneEvent contentPartDone)Emitted when a content part is done. abstract TvisitCreated(ResponseCreatedEvent created)An event that is emitted when a response is created. abstract TvisitError(ResponseErrorEvent error)Emitted when an error occurs. abstract TvisitFileSearchCallCompleted(ResponseFileSearchCallCompletedEvent fileSearchCallCompleted)Emitted when a file search call is completed (results found). abstract TvisitFileSearchCallInProgress(ResponseFileSearchCallInProgressEvent fileSearchCallInProgress)Emitted when a file search call is initiated. abstract TvisitFileSearchCallSearching(ResponseFileSearchCallSearchingEvent fileSearchCallSearching)Emitted when a file search is currently searching. abstract TvisitFunctionCallArgumentsDelta(ResponseFunctionCallArgumentsDeltaEvent functionCallArgumentsDelta)Emitted when there is a partial function-call arguments delta. abstract TvisitFunctionCallArgumentsDone(ResponseFunctionCallArgumentsDoneEvent functionCallArgumentsDone)Emitted when function-call arguments are finalized. abstract TvisitInProgress(ResponseInProgressEvent inProgress)Emitted when the response is in progress. abstract TvisitFailed(ResponseFailedEvent failed)An event that is emitted when a response fails. abstract TvisitIncomplete(ResponseIncompleteEvent incomplete)An event that is emitted when a response finishes as incomplete. abstract TvisitOutputItemAdded(ResponseOutputItemAddedEvent outputItemAdded)Emitted when a new output item is added. abstract TvisitOutputItemDone(ResponseOutputItemDoneEvent outputItemDone)Emitted when an output item is marked done. abstract TvisitReasoningSummaryPartAdded(ResponseReasoningSummaryPartAddedEvent reasoningSummaryPartAdded)Emitted when a new reasoning summary part is added. abstract TvisitReasoningSummaryPartDone(ResponseReasoningSummaryPartDoneEvent reasoningSummaryPartDone)Emitted when a reasoning summary part is completed. abstract TvisitReasoningSummaryTextDelta(ResponseReasoningSummaryTextDeltaEvent reasoningSummaryTextDelta)Emitted when a delta is added to a reasoning summary text. abstract TvisitReasoningSummaryTextDone(ResponseReasoningSummaryTextDoneEvent reasoningSummaryTextDone)Emitted when a reasoning summary text is completed. abstract TvisitReasoningTextDelta(ResponseReasoningTextDeltaEvent reasoningTextDelta)Emitted when a delta is added to a reasoning text. abstract TvisitReasoningTextDone(ResponseReasoningTextDoneEvent reasoningTextDone)Emitted when a reasoning text is completed. abstract TvisitRefusalDelta(ResponseRefusalDeltaEvent refusalDelta)Emitted when there is a partial refusal text. abstract TvisitRefusalDone(ResponseRefusalDoneEvent refusalDone)Emitted when refusal text is finalized. abstract TvisitOutputTextDelta(ResponseTextDeltaEvent outputTextDelta)Emitted when there is an additional text delta. abstract TvisitOutputTextDone(ResponseTextDoneEvent outputTextDone)Emitted when text content is finalized. abstract TvisitWebSearchCallCompleted(ResponseWebSearchCallCompletedEvent webSearchCallCompleted)Emitted when a web search call is completed. abstract TvisitWebSearchCallInProgress(ResponseWebSearchCallInProgressEvent webSearchCallInProgress)Emitted when a web search call is initiated. abstract TvisitWebSearchCallSearching(ResponseWebSearchCallSearchingEvent webSearchCallSearching)Emitted when a web search call is executing. abstract TvisitImageGenerationCallCompleted(ResponseImageGenCallCompletedEvent imageGenerationCallCompleted)Emitted when an image generation tool call has completed and the final image is available. abstract TvisitImageGenerationCallGenerating(ResponseImageGenCallGeneratingEvent imageGenerationCallGenerating)Emitted when an image generation tool call is actively generating an image (intermediate state). abstract TvisitImageGenerationCallInProgress(ResponseImageGenCallInProgressEvent imageGenerationCallInProgress)Emitted when an image generation tool call is in progress. abstract TvisitImageGenerationCallPartialImage(ResponseImageGenCallPartialImageEvent imageGenerationCallPartialImage)Emitted when a partial image is available during image generation streaming. abstract TvisitMcpCallArgumentsDelta(ResponseMcpCallArgumentsDeltaEvent mcpCallArgumentsDelta)Emitted when there is a delta (partial update) to the arguments of an MCP tool call. abstract TvisitMcpCallArgumentsDone(ResponseMcpCallArgumentsDoneEvent mcpCallArgumentsDone)Emitted when the arguments for an MCP tool call are finalized. abstract TvisitMcpCallCompleted(ResponseMcpCallCompletedEvent mcpCallCompleted)Emitted when an MCP tool call has completed successfully. abstract TvisitMcpCallFailed(ResponseMcpCallFailedEvent mcpCallFailed)Emitted when an MCP tool call has failed. abstract TvisitMcpCallInProgress(ResponseMcpCallInProgressEvent mcpCallInProgress)Emitted when an MCP tool call is in progress. abstract TvisitMcpListToolsCompleted(ResponseMcpListToolsCompletedEvent mcpListToolsCompleted)Emitted when the list of available MCP tools has been successfully retrieved. abstract TvisitMcpListToolsFailed(ResponseMcpListToolsFailedEvent mcpListToolsFailed)Emitted when the attempt to list available MCP tools has failed. abstract TvisitMcpListToolsInProgress(ResponseMcpListToolsInProgressEvent mcpListToolsInProgress)Emitted when the system is in the process of retrieving the list of available MCP tools. abstract TvisitOutputTextAnnotationAdded(ResponseOutputTextAnnotationAddedEvent outputTextAnnotationAdded)Emitted when an annotation is added to output text content. abstract TvisitQueued(ResponseQueuedEvent queued)Emitted when a response is queued and waiting to be processed. abstract TvisitCustomToolCallInputDelta(ResponseCustomToolCallInputDeltaEvent customToolCallInputDelta)Event representing a delta (partial update) to the input of a custom tool call. abstract TvisitCustomToolCallInputDone(ResponseCustomToolCallInputDoneEvent customToolCallInputDone)Event indicating that input for a custom tool call is complete. Tunknown(JsonValue json)Maps an unknown variant of ResponseStreamEvent to a value of type T. - 
                    
                    
                    - 
                                
                            
                                Method Detail- 
                                        visitAudioDeltaabstract T visitAudioDelta(ResponseAudioDeltaEvent audioDelta) Emitted when there is a partial audio response. 
 - 
                                        visitAudioDoneabstract T visitAudioDone(ResponseAudioDoneEvent audioDone) Emitted when the audio response is complete. 
 - 
                                        visitAudioTranscriptDeltaabstract T visitAudioTranscriptDelta(ResponseAudioTranscriptDeltaEvent audioTranscriptDelta) Emitted when there is a partial transcript of audio. 
 - 
                                        visitAudioTranscriptDoneabstract T visitAudioTranscriptDone(ResponseAudioTranscriptDoneEvent audioTranscriptDone) Emitted when the full audio transcript is completed. 
 - 
                                        visitCodeInterpreterCallCodeDeltaabstract T visitCodeInterpreterCallCodeDelta(ResponseCodeInterpreterCallCodeDeltaEvent codeInterpreterCallCodeDelta) Emitted when a partial code snippet is streamed by the code interpreter. 
 - 
                                        visitCodeInterpreterCallCodeDoneabstract T visitCodeInterpreterCallCodeDone(ResponseCodeInterpreterCallCodeDoneEvent codeInterpreterCallCodeDone) Emitted when the code snippet is finalized by the code interpreter. 
 - 
                                        visitCodeInterpreterCallCompletedabstract T visitCodeInterpreterCallCompleted(ResponseCodeInterpreterCallCompletedEvent codeInterpreterCallCompleted) Emitted when the code interpreter call is completed. 
 - 
                                        visitCodeInterpreterCallInProgressabstract T visitCodeInterpreterCallInProgress(ResponseCodeInterpreterCallInProgressEvent codeInterpreterCallInProgress) Emitted when a code interpreter call is in progress. 
 - 
                                        visitCodeInterpreterCallInterpretingabstract T visitCodeInterpreterCallInterpreting(ResponseCodeInterpreterCallInterpretingEvent codeInterpreterCallInterpreting) Emitted when the code interpreter is actively interpreting the code snippet. 
 - 
                                        visitCompletedabstract T visitCompleted(ResponseCompletedEvent completed) Emitted when the model response is complete. 
 - 
                                        visitContentPartAddedabstract T visitContentPartAdded(ResponseContentPartAddedEvent contentPartAdded) Emitted when a new content part is added. 
 - 
                                        visitContentPartDoneabstract T visitContentPartDone(ResponseContentPartDoneEvent contentPartDone) Emitted when a content part is done. 
 - 
                                        visitCreatedabstract T visitCreated(ResponseCreatedEvent created) An event that is emitted when a response is created. 
 - 
                                        visitErrorabstract T visitError(ResponseErrorEvent error) Emitted when an error occurs. 
 - 
                                        visitFileSearchCallCompletedabstract T visitFileSearchCallCompleted(ResponseFileSearchCallCompletedEvent fileSearchCallCompleted) Emitted when a file search call is completed (results found). 
 - 
                                        visitFileSearchCallInProgressabstract T visitFileSearchCallInProgress(ResponseFileSearchCallInProgressEvent fileSearchCallInProgress) Emitted when a file search call is initiated. 
 - 
                                        visitFileSearchCallSearchingabstract T visitFileSearchCallSearching(ResponseFileSearchCallSearchingEvent fileSearchCallSearching) Emitted when a file search is currently searching. 
 - 
                                        visitFunctionCallArgumentsDeltaabstract T visitFunctionCallArgumentsDelta(ResponseFunctionCallArgumentsDeltaEvent functionCallArgumentsDelta) Emitted when there is a partial function-call arguments delta. 
 - 
                                        visitFunctionCallArgumentsDoneabstract T visitFunctionCallArgumentsDone(ResponseFunctionCallArgumentsDoneEvent functionCallArgumentsDone) Emitted when function-call arguments are finalized. 
 - 
                                        visitInProgressabstract T visitInProgress(ResponseInProgressEvent inProgress) Emitted when the response is in progress. 
 - 
                                        visitFailedabstract T visitFailed(ResponseFailedEvent failed) An event that is emitted when a response fails. 
 - 
                                        visitIncompleteabstract T visitIncomplete(ResponseIncompleteEvent incomplete) An event that is emitted when a response finishes as incomplete. 
 - 
                                        visitOutputItemAddedabstract T visitOutputItemAdded(ResponseOutputItemAddedEvent outputItemAdded) Emitted when a new output item is added. 
 - 
                                        visitOutputItemDoneabstract T visitOutputItemDone(ResponseOutputItemDoneEvent outputItemDone) Emitted when an output item is marked done. 
 - 
                                        visitReasoningSummaryPartAddedabstract T visitReasoningSummaryPartAdded(ResponseReasoningSummaryPartAddedEvent reasoningSummaryPartAdded) Emitted when a new reasoning summary part is added. 
 - 
                                        visitReasoningSummaryPartDoneabstract T visitReasoningSummaryPartDone(ResponseReasoningSummaryPartDoneEvent reasoningSummaryPartDone) Emitted when a reasoning summary part is completed. 
 - 
                                        visitReasoningSummaryTextDeltaabstract T visitReasoningSummaryTextDelta(ResponseReasoningSummaryTextDeltaEvent reasoningSummaryTextDelta) Emitted when a delta is added to a reasoning summary text. 
 - 
                                        visitReasoningSummaryTextDoneabstract T visitReasoningSummaryTextDone(ResponseReasoningSummaryTextDoneEvent reasoningSummaryTextDone) Emitted when a reasoning summary text is completed. 
 - 
                                        visitReasoningTextDeltaabstract T visitReasoningTextDelta(ResponseReasoningTextDeltaEvent reasoningTextDelta) Emitted when a delta is added to a reasoning text. 
 - 
                                        visitReasoningTextDoneabstract T visitReasoningTextDone(ResponseReasoningTextDoneEvent reasoningTextDone) Emitted when a reasoning text is completed. 
 - 
                                        visitRefusalDeltaabstract T visitRefusalDelta(ResponseRefusalDeltaEvent refusalDelta) Emitted when there is a partial refusal text. 
 - 
                                        visitRefusalDoneabstract T visitRefusalDone(ResponseRefusalDoneEvent refusalDone) Emitted when refusal text is finalized. 
 - 
                                        visitOutputTextDeltaabstract T visitOutputTextDelta(ResponseTextDeltaEvent outputTextDelta) Emitted when there is an additional text delta. 
 - 
                                        visitOutputTextDoneabstract T visitOutputTextDone(ResponseTextDoneEvent outputTextDone) Emitted when text content is finalized. 
 - 
                                        visitWebSearchCallCompletedabstract T visitWebSearchCallCompleted(ResponseWebSearchCallCompletedEvent webSearchCallCompleted) Emitted when a web search call is completed. 
 - 
                                        visitWebSearchCallInProgressabstract T visitWebSearchCallInProgress(ResponseWebSearchCallInProgressEvent webSearchCallInProgress) Emitted when a web search call is initiated. 
 - 
                                        visitWebSearchCallSearchingabstract T visitWebSearchCallSearching(ResponseWebSearchCallSearchingEvent webSearchCallSearching) Emitted when a web search call is executing. 
 - 
                                        visitImageGenerationCallCompletedabstract T visitImageGenerationCallCompleted(ResponseImageGenCallCompletedEvent imageGenerationCallCompleted) Emitted when an image generation tool call has completed and the final image is available. 
 - 
                                        visitImageGenerationCallGeneratingabstract T visitImageGenerationCallGenerating(ResponseImageGenCallGeneratingEvent imageGenerationCallGenerating) Emitted when an image generation tool call is actively generating an image (intermediate state). 
 - 
                                        visitImageGenerationCallInProgressabstract T visitImageGenerationCallInProgress(ResponseImageGenCallInProgressEvent imageGenerationCallInProgress) Emitted when an image generation tool call is in progress. 
 - 
                                        visitImageGenerationCallPartialImageabstract T visitImageGenerationCallPartialImage(ResponseImageGenCallPartialImageEvent imageGenerationCallPartialImage) Emitted when a partial image is available during image generation streaming. 
 - 
                                        visitMcpCallArgumentsDeltaabstract T visitMcpCallArgumentsDelta(ResponseMcpCallArgumentsDeltaEvent mcpCallArgumentsDelta) Emitted when there is a delta (partial update) to the arguments of an MCP tool call. 
 - 
                                        visitMcpCallArgumentsDoneabstract T visitMcpCallArgumentsDone(ResponseMcpCallArgumentsDoneEvent mcpCallArgumentsDone) Emitted when the arguments for an MCP tool call are finalized. 
 - 
                                        visitMcpCallCompletedabstract T visitMcpCallCompleted(ResponseMcpCallCompletedEvent mcpCallCompleted) Emitted when an MCP tool call has completed successfully. 
 - 
                                        visitMcpCallFailedabstract T visitMcpCallFailed(ResponseMcpCallFailedEvent mcpCallFailed) Emitted when an MCP tool call has failed. 
 - 
                                        visitMcpCallInProgressabstract T visitMcpCallInProgress(ResponseMcpCallInProgressEvent mcpCallInProgress) Emitted when an MCP tool call is in progress. 
 - 
                                        visitMcpListToolsCompletedabstract T visitMcpListToolsCompleted(ResponseMcpListToolsCompletedEvent mcpListToolsCompleted) Emitted when the list of available MCP tools has been successfully retrieved. 
 - 
                                        visitMcpListToolsFailedabstract T visitMcpListToolsFailed(ResponseMcpListToolsFailedEvent mcpListToolsFailed) Emitted when the attempt to list available MCP tools has failed. 
 - 
                                        visitMcpListToolsInProgressabstract T visitMcpListToolsInProgress(ResponseMcpListToolsInProgressEvent mcpListToolsInProgress) Emitted when the system is in the process of retrieving the list of available MCP tools. 
 - 
                                        visitOutputTextAnnotationAddedabstract T visitOutputTextAnnotationAdded(ResponseOutputTextAnnotationAddedEvent outputTextAnnotationAdded) Emitted when an annotation is added to output text content. 
 - 
                                        visitQueuedabstract T visitQueued(ResponseQueuedEvent queued) Emitted when a response is queued and waiting to be processed. 
 - 
                                        visitCustomToolCallInputDeltaabstract T visitCustomToolCallInputDelta(ResponseCustomToolCallInputDeltaEvent customToolCallInputDelta) Event representing a delta (partial update) to the input of a custom tool call. 
 - 
                                        visitCustomToolCallInputDoneabstract T visitCustomToolCallInputDone(ResponseCustomToolCallInputDoneEvent customToolCallInputDone) Event indicating that input for a custom tool call is complete. 
 - 
                                        unknownT unknown(JsonValue json) Maps an unknown variant of ResponseStreamEvent to a value of type T. An instance of ResponseStreamEvent 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. 
 
- 
                                        
 
- 
                                
                            
                                
 
- 
                    
                    
                    
 
-