Interface ResponsesServerEvent.Visitor
-
- All Implemented Interfaces:
public interface ResponsesServerEvent.Visitor<T extends Object>An interface that defines how to map each variant of ResponsesServerEvent to a value of type T.
-
-
Method Summary
Modifier and Type Method Description abstract TvisitResponseAudioDelta(ResponseAudioDeltaEvent responseAudioDelta)Emitted when there is a partial audio response. abstract TvisitResponseAudioDone(ResponseAudioDoneEvent responseAudioDone)Emitted when the audio response is complete. abstract TvisitResponseAudioTranscriptDelta(ResponseAudioTranscriptDeltaEvent responseAudioTranscriptDelta)Emitted when there is a partial transcript of audio. abstract TvisitResponseAudioTranscriptDone(ResponseAudioTranscriptDoneEvent responseAudioTranscriptDone)Emitted when the full audio transcript is completed. abstract TvisitResponseCodeInterpreterCallCodeDelta(ResponseCodeInterpreterCallCodeDeltaEvent responseCodeInterpreterCallCodeDelta)Emitted when a partial code snippet is streamed by the code interpreter. abstract TvisitResponseCodeInterpreterCallCodeDone(ResponseCodeInterpreterCallCodeDoneEvent responseCodeInterpreterCallCodeDone)Emitted when the code snippet is finalized by the code interpreter. abstract TvisitResponseCodeInterpreterCallCompleted(ResponseCodeInterpreterCallCompletedEvent responseCodeInterpreterCallCompleted)Emitted when the code interpreter call is completed. abstract TvisitResponseCodeInterpreterCallInProgress(ResponseCodeInterpreterCallInProgressEvent responseCodeInterpreterCallInProgress)Emitted when a code interpreter call is in progress. abstract TvisitResponseCodeInterpreterCallInterpreting(ResponseCodeInterpreterCallInterpretingEvent responseCodeInterpreterCallInterpreting)Emitted when the code interpreter is actively interpreting the code snippet. abstract TvisitResponseCompleted(ResponseCompletedEvent responseCompleted)Emitted when the model response is complete. abstract TvisitResponseContentPartAdded(ResponseContentPartAddedEvent responseContentPartAdded)Emitted when a new content part is added. abstract TvisitResponseContentPartDone(ResponseContentPartDoneEvent responseContentPartDone)Emitted when a content part is done. abstract TvisitResponseCreated(ResponseCreatedEvent responseCreated)An event that is emitted when a response is created. abstract TvisitError(ResponseErrorEvent error)Emitted when an error occurs. abstract TvisitResponseFileSearchCallCompleted(ResponseFileSearchCallCompletedEvent responseFileSearchCallCompleted)Emitted when a file search call is completed (results found). abstract TvisitResponseFileSearchCallInProgress(ResponseFileSearchCallInProgressEvent responseFileSearchCallInProgress)Emitted when a file search call is initiated. abstract TvisitResponseFileSearchCallSearching(ResponseFileSearchCallSearchingEvent responseFileSearchCallSearching)Emitted when a file search is currently searching. abstract TvisitResponseFunctionCallArgumentsDelta(ResponseFunctionCallArgumentsDeltaEvent responseFunctionCallArgumentsDelta)Emitted when there is a partial function-call arguments delta. abstract TvisitResponseFunctionCallArgumentsDone(ResponseFunctionCallArgumentsDoneEvent responseFunctionCallArgumentsDone)Emitted when function-call arguments are finalized. abstract TvisitResponseInProgress(ResponseInProgressEvent responseInProgress)Emitted when the response is in progress. abstract TvisitResponseFailed(ResponseFailedEvent responseFailed)An event that is emitted when a response fails. abstract TvisitResponseIncomplete(ResponseIncompleteEvent responseIncomplete)An event that is emitted when a response finishes as incomplete. abstract TvisitResponseOutputItemAdded(ResponseOutputItemAddedEvent responseOutputItemAdded)Emitted when a new output item is added. abstract TvisitResponseOutputItemDone(ResponseOutputItemDoneEvent responseOutputItemDone)Emitted when an output item is marked done. abstract TvisitResponseReasoningSummaryPartAdded(ResponseReasoningSummaryPartAddedEvent responseReasoningSummaryPartAdded)Emitted when a new reasoning summary part is added. abstract TvisitResponseReasoningSummaryPartDone(ResponseReasoningSummaryPartDoneEvent responseReasoningSummaryPartDone)Emitted when a reasoning summary part is completed. abstract TvisitResponseReasoningSummaryTextDelta(ResponseReasoningSummaryTextDeltaEvent responseReasoningSummaryTextDelta)Emitted when a delta is added to a reasoning summary text. abstract TvisitResponseReasoningSummaryTextDone(ResponseReasoningSummaryTextDoneEvent responseReasoningSummaryTextDone)Emitted when a reasoning summary text is completed. abstract TvisitResponseReasoningTextDelta(ResponseReasoningTextDeltaEvent responseReasoningTextDelta)Emitted when a delta is added to a reasoning text. abstract TvisitResponseReasoningTextDone(ResponseReasoningTextDoneEvent responseReasoningTextDone)Emitted when a reasoning text is completed. abstract TvisitResponseRefusalDelta(ResponseRefusalDeltaEvent responseRefusalDelta)Emitted when there is a partial refusal text. abstract TvisitResponseRefusalDone(ResponseRefusalDoneEvent responseRefusalDone)Emitted when refusal text is finalized. abstract TvisitResponseOutputTextDelta(ResponseTextDeltaEvent responseOutputTextDelta)Emitted when there is an additional text delta. abstract TvisitResponseOutputTextDone(ResponseTextDoneEvent responseOutputTextDone)Emitted when text content is finalized. abstract TvisitResponseWebSearchCallCompleted(ResponseWebSearchCallCompletedEvent responseWebSearchCallCompleted)Emitted when a web search call is completed. abstract TvisitResponseWebSearchCallInProgress(ResponseWebSearchCallInProgressEvent responseWebSearchCallInProgress)Emitted when a web search call is initiated. abstract TvisitResponseWebSearchCallSearching(ResponseWebSearchCallSearchingEvent responseWebSearchCallSearching)Emitted when a web search call is executing. abstract TvisitResponseImageGenerationCallCompleted(ResponseImageGenCallCompletedEvent responseImageGenerationCallCompleted)Emitted when an image generation tool call has completed and the final image is available. abstract TvisitResponseImageGenerationCallGenerating(ResponseImageGenCallGeneratingEvent responseImageGenerationCallGenerating)Emitted when an image generation tool call is actively generating an image (intermediate state). abstract TvisitResponseImageGenerationCallInProgress(ResponseImageGenCallInProgressEvent responseImageGenerationCallInProgress)Emitted when an image generation tool call is in progress. abstract TvisitResponseImageGenerationCallPartialImage(ResponseImageGenCallPartialImageEvent responseImageGenerationCallPartialImage)Emitted when a partial image is available during image generation streaming. abstract TvisitResponseMcpCallArgumentsDelta(ResponseMcpCallArgumentsDeltaEvent responseMcpCallArgumentsDelta)Emitted when there is a delta (partial update) to the arguments of an MCP tool call. abstract TvisitResponseMcpCallArgumentsDone(ResponseMcpCallArgumentsDoneEvent responseMcpCallArgumentsDone)Emitted when the arguments for an MCP tool call are finalized. abstract TvisitResponseMcpCallCompleted(ResponseMcpCallCompletedEvent responseMcpCallCompleted)Emitted when an MCP tool call has completed successfully. abstract TvisitResponseMcpCallFailed(ResponseMcpCallFailedEvent responseMcpCallFailed)Emitted when an MCP tool call has failed. abstract TvisitResponseMcpCallInProgress(ResponseMcpCallInProgressEvent responseMcpCallInProgress)Emitted when an MCP tool call is in progress. abstract TvisitResponseMcpListToolsCompleted(ResponseMcpListToolsCompletedEvent responseMcpListToolsCompleted)Emitted when the list of available MCP tools has been successfully retrieved. abstract TvisitResponseMcpListToolsFailed(ResponseMcpListToolsFailedEvent responseMcpListToolsFailed)Emitted when the attempt to list available MCP tools has failed. abstract TvisitResponseMcpListToolsInProgress(ResponseMcpListToolsInProgressEvent responseMcpListToolsInProgress)Emitted when the system is in the process of retrieving the list of available MCP tools. abstract TvisitResponseOutputTextAnnotationAdded(ResponseOutputTextAnnotationAddedEvent responseOutputTextAnnotationAdded)Emitted when an annotation is added to output text content. abstract TvisitResponseQueued(ResponseQueuedEvent responseQueued)Emitted when a response is queued and waiting to be processed. abstract TvisitResponseCustomToolCallInputDelta(ResponseCustomToolCallInputDeltaEvent responseCustomToolCallInputDelta)Event representing a delta (partial update) to the input of a custom tool call. abstract TvisitResponseCustomToolCallInputDone(ResponseCustomToolCallInputDoneEvent responseCustomToolCallInputDone)Event indicating that input for a custom tool call is complete. Tunknown(JsonValue json)Maps an unknown variant of ResponsesServerEvent to a value of type T. -
-
Method Detail
-
visitResponseAudioDelta
abstract T visitResponseAudioDelta(ResponseAudioDeltaEvent responseAudioDelta)
Emitted when there is a partial audio response.
-
visitResponseAudioDone
abstract T visitResponseAudioDone(ResponseAudioDoneEvent responseAudioDone)
Emitted when the audio response is complete.
-
visitResponseAudioTranscriptDelta
abstract T visitResponseAudioTranscriptDelta(ResponseAudioTranscriptDeltaEvent responseAudioTranscriptDelta)
Emitted when there is a partial transcript of audio.
-
visitResponseAudioTranscriptDone
abstract T visitResponseAudioTranscriptDone(ResponseAudioTranscriptDoneEvent responseAudioTranscriptDone)
Emitted when the full audio transcript is completed.
-
visitResponseCodeInterpreterCallCodeDelta
abstract T visitResponseCodeInterpreterCallCodeDelta(ResponseCodeInterpreterCallCodeDeltaEvent responseCodeInterpreterCallCodeDelta)
Emitted when a partial code snippet is streamed by the code interpreter.
-
visitResponseCodeInterpreterCallCodeDone
abstract T visitResponseCodeInterpreterCallCodeDone(ResponseCodeInterpreterCallCodeDoneEvent responseCodeInterpreterCallCodeDone)
Emitted when the code snippet is finalized by the code interpreter.
-
visitResponseCodeInterpreterCallCompleted
abstract T visitResponseCodeInterpreterCallCompleted(ResponseCodeInterpreterCallCompletedEvent responseCodeInterpreterCallCompleted)
Emitted when the code interpreter call is completed.
-
visitResponseCodeInterpreterCallInProgress
abstract T visitResponseCodeInterpreterCallInProgress(ResponseCodeInterpreterCallInProgressEvent responseCodeInterpreterCallInProgress)
Emitted when a code interpreter call is in progress.
-
visitResponseCodeInterpreterCallInterpreting
abstract T visitResponseCodeInterpreterCallInterpreting(ResponseCodeInterpreterCallInterpretingEvent responseCodeInterpreterCallInterpreting)
Emitted when the code interpreter is actively interpreting the code snippet.
-
visitResponseCompleted
abstract T visitResponseCompleted(ResponseCompletedEvent responseCompleted)
Emitted when the model response is complete.
-
visitResponseContentPartAdded
abstract T visitResponseContentPartAdded(ResponseContentPartAddedEvent responseContentPartAdded)
Emitted when a new content part is added.
-
visitResponseContentPartDone
abstract T visitResponseContentPartDone(ResponseContentPartDoneEvent responseContentPartDone)
Emitted when a content part is done.
-
visitResponseCreated
abstract T visitResponseCreated(ResponseCreatedEvent responseCreated)
An event that is emitted when a response is created.
-
visitError
abstract T visitError(ResponseErrorEvent error)
Emitted when an error occurs.
-
visitResponseFileSearchCallCompleted
abstract T visitResponseFileSearchCallCompleted(ResponseFileSearchCallCompletedEvent responseFileSearchCallCompleted)
Emitted when a file search call is completed (results found).
-
visitResponseFileSearchCallInProgress
abstract T visitResponseFileSearchCallInProgress(ResponseFileSearchCallInProgressEvent responseFileSearchCallInProgress)
Emitted when a file search call is initiated.
-
visitResponseFileSearchCallSearching
abstract T visitResponseFileSearchCallSearching(ResponseFileSearchCallSearchingEvent responseFileSearchCallSearching)
Emitted when a file search is currently searching.
-
visitResponseFunctionCallArgumentsDelta
abstract T visitResponseFunctionCallArgumentsDelta(ResponseFunctionCallArgumentsDeltaEvent responseFunctionCallArgumentsDelta)
Emitted when there is a partial function-call arguments delta.
-
visitResponseFunctionCallArgumentsDone
abstract T visitResponseFunctionCallArgumentsDone(ResponseFunctionCallArgumentsDoneEvent responseFunctionCallArgumentsDone)
Emitted when function-call arguments are finalized.
-
visitResponseInProgress
abstract T visitResponseInProgress(ResponseInProgressEvent responseInProgress)
Emitted when the response is in progress.
-
visitResponseFailed
abstract T visitResponseFailed(ResponseFailedEvent responseFailed)
An event that is emitted when a response fails.
-
visitResponseIncomplete
abstract T visitResponseIncomplete(ResponseIncompleteEvent responseIncomplete)
An event that is emitted when a response finishes as incomplete.
-
visitResponseOutputItemAdded
abstract T visitResponseOutputItemAdded(ResponseOutputItemAddedEvent responseOutputItemAdded)
Emitted when a new output item is added.
-
visitResponseOutputItemDone
abstract T visitResponseOutputItemDone(ResponseOutputItemDoneEvent responseOutputItemDone)
Emitted when an output item is marked done.
-
visitResponseReasoningSummaryPartAdded
abstract T visitResponseReasoningSummaryPartAdded(ResponseReasoningSummaryPartAddedEvent responseReasoningSummaryPartAdded)
Emitted when a new reasoning summary part is added.
-
visitResponseReasoningSummaryPartDone
abstract T visitResponseReasoningSummaryPartDone(ResponseReasoningSummaryPartDoneEvent responseReasoningSummaryPartDone)
Emitted when a reasoning summary part is completed.
-
visitResponseReasoningSummaryTextDelta
abstract T visitResponseReasoningSummaryTextDelta(ResponseReasoningSummaryTextDeltaEvent responseReasoningSummaryTextDelta)
Emitted when a delta is added to a reasoning summary text.
-
visitResponseReasoningSummaryTextDone
abstract T visitResponseReasoningSummaryTextDone(ResponseReasoningSummaryTextDoneEvent responseReasoningSummaryTextDone)
Emitted when a reasoning summary text is completed.
-
visitResponseReasoningTextDelta
abstract T visitResponseReasoningTextDelta(ResponseReasoningTextDeltaEvent responseReasoningTextDelta)
Emitted when a delta is added to a reasoning text.
-
visitResponseReasoningTextDone
abstract T visitResponseReasoningTextDone(ResponseReasoningTextDoneEvent responseReasoningTextDone)
Emitted when a reasoning text is completed.
-
visitResponseRefusalDelta
abstract T visitResponseRefusalDelta(ResponseRefusalDeltaEvent responseRefusalDelta)
Emitted when there is a partial refusal text.
-
visitResponseRefusalDone
abstract T visitResponseRefusalDone(ResponseRefusalDoneEvent responseRefusalDone)
Emitted when refusal text is finalized.
-
visitResponseOutputTextDelta
abstract T visitResponseOutputTextDelta(ResponseTextDeltaEvent responseOutputTextDelta)
Emitted when there is an additional text delta.
-
visitResponseOutputTextDone
abstract T visitResponseOutputTextDone(ResponseTextDoneEvent responseOutputTextDone)
Emitted when text content is finalized.
-
visitResponseWebSearchCallCompleted
abstract T visitResponseWebSearchCallCompleted(ResponseWebSearchCallCompletedEvent responseWebSearchCallCompleted)
Emitted when a web search call is completed.
-
visitResponseWebSearchCallInProgress
abstract T visitResponseWebSearchCallInProgress(ResponseWebSearchCallInProgressEvent responseWebSearchCallInProgress)
Emitted when a web search call is initiated.
-
visitResponseWebSearchCallSearching
abstract T visitResponseWebSearchCallSearching(ResponseWebSearchCallSearchingEvent responseWebSearchCallSearching)
Emitted when a web search call is executing.
-
visitResponseImageGenerationCallCompleted
abstract T visitResponseImageGenerationCallCompleted(ResponseImageGenCallCompletedEvent responseImageGenerationCallCompleted)
Emitted when an image generation tool call has completed and the final image is available.
-
visitResponseImageGenerationCallGenerating
abstract T visitResponseImageGenerationCallGenerating(ResponseImageGenCallGeneratingEvent responseImageGenerationCallGenerating)
Emitted when an image generation tool call is actively generating an image (intermediate state).
-
visitResponseImageGenerationCallInProgress
abstract T visitResponseImageGenerationCallInProgress(ResponseImageGenCallInProgressEvent responseImageGenerationCallInProgress)
Emitted when an image generation tool call is in progress.
-
visitResponseImageGenerationCallPartialImage
abstract T visitResponseImageGenerationCallPartialImage(ResponseImageGenCallPartialImageEvent responseImageGenerationCallPartialImage)
Emitted when a partial image is available during image generation streaming.
-
visitResponseMcpCallArgumentsDelta
abstract T visitResponseMcpCallArgumentsDelta(ResponseMcpCallArgumentsDeltaEvent responseMcpCallArgumentsDelta)
Emitted when there is a delta (partial update) to the arguments of an MCP tool call.
-
visitResponseMcpCallArgumentsDone
abstract T visitResponseMcpCallArgumentsDone(ResponseMcpCallArgumentsDoneEvent responseMcpCallArgumentsDone)
Emitted when the arguments for an MCP tool call are finalized.
-
visitResponseMcpCallCompleted
abstract T visitResponseMcpCallCompleted(ResponseMcpCallCompletedEvent responseMcpCallCompleted)
Emitted when an MCP tool call has completed successfully.
-
visitResponseMcpCallFailed
abstract T visitResponseMcpCallFailed(ResponseMcpCallFailedEvent responseMcpCallFailed)
Emitted when an MCP tool call has failed.
-
visitResponseMcpCallInProgress
abstract T visitResponseMcpCallInProgress(ResponseMcpCallInProgressEvent responseMcpCallInProgress)
Emitted when an MCP tool call is in progress.
-
visitResponseMcpListToolsCompleted
abstract T visitResponseMcpListToolsCompleted(ResponseMcpListToolsCompletedEvent responseMcpListToolsCompleted)
Emitted when the list of available MCP tools has been successfully retrieved.
-
visitResponseMcpListToolsFailed
abstract T visitResponseMcpListToolsFailed(ResponseMcpListToolsFailedEvent responseMcpListToolsFailed)
Emitted when the attempt to list available MCP tools has failed.
-
visitResponseMcpListToolsInProgress
abstract T visitResponseMcpListToolsInProgress(ResponseMcpListToolsInProgressEvent responseMcpListToolsInProgress)
Emitted when the system is in the process of retrieving the list of available MCP tools.
-
visitResponseOutputTextAnnotationAdded
abstract T visitResponseOutputTextAnnotationAdded(ResponseOutputTextAnnotationAddedEvent responseOutputTextAnnotationAdded)
Emitted when an annotation is added to output text content.
-
visitResponseQueued
abstract T visitResponseQueued(ResponseQueuedEvent responseQueued)
Emitted when a response is queued and waiting to be processed.
-
visitResponseCustomToolCallInputDelta
abstract T visitResponseCustomToolCallInputDelta(ResponseCustomToolCallInputDeltaEvent responseCustomToolCallInputDelta)
Event representing a delta (partial update) to the input of a custom tool call.
-
visitResponseCustomToolCallInputDone
abstract T visitResponseCustomToolCallInputDone(ResponseCustomToolCallInputDoneEvent responseCustomToolCallInputDone)
Event indicating that input for a custom tool call is complete.
-
unknown
T unknown(JsonValue json)
Maps an unknown variant of ResponsesServerEvent to a value of type T.
An instance of ResponsesServerEvent 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.
-
-
-
-