Interface BetaResponseStreamEvent.Visitor
-
- All Implemented Interfaces:
public interface BetaResponseStreamEvent.Visitor<T extends Object>An interface that defines how to map each variant of BetaResponseStreamEvent to a value of type T.
-
-
Method Summary
Modifier and Type Method Description abstract TvisitResponseAudioDelta(BetaResponseAudioDeltaEvent responseAudioDelta)Emitted when there is a partial audio response. abstract TvisitResponseAudioDone(BetaResponseAudioDoneEvent responseAudioDone)Emitted when the audio response is complete. abstract TvisitResponseAudioTranscriptDelta(BetaResponseAudioTranscriptDeltaEvent responseAudioTranscriptDelta)Emitted when there is a partial transcript of audio. abstract TvisitResponseAudioTranscriptDone(BetaResponseAudioTranscriptDoneEvent responseAudioTranscriptDone)Emitted when the full audio transcript is completed. abstract TvisitResponseCodeInterpreterCallCodeDelta(BetaResponseCodeInterpreterCallCodeDeltaEvent responseCodeInterpreterCallCodeDelta)Emitted when a partial code snippet is streamed by the code interpreter. abstract TvisitResponseCodeInterpreterCallCodeDone(BetaResponseCodeInterpreterCallCodeDoneEvent responseCodeInterpreterCallCodeDone)Emitted when the code snippet is finalized by the code interpreter. abstract TvisitResponseCodeInterpreterCallCompleted(BetaResponseCodeInterpreterCallCompletedEvent responseCodeInterpreterCallCompleted)Emitted when the code interpreter call is completed. abstract TvisitResponseCodeInterpreterCallInProgress(BetaResponseCodeInterpreterCallInProgressEvent responseCodeInterpreterCallInProgress)Emitted when a code interpreter call is in progress. abstract TvisitResponseCodeInterpreterCallInterpreting(BetaResponseCodeInterpreterCallInterpretingEvent responseCodeInterpreterCallInterpreting)Emitted when the code interpreter is actively interpreting the code snippet. abstract TvisitResponseCompleted(BetaResponseCompletedEvent responseCompleted)Emitted when the model response is complete. abstract TvisitResponseContentPartAdded(BetaResponseContentPartAddedEvent responseContentPartAdded)Emitted when a new content part is added. abstract TvisitResponseContentPartDone(BetaResponseContentPartDoneEvent responseContentPartDone)Emitted when a content part is done. abstract TvisitResponseCreated(BetaResponseCreatedEvent responseCreated)An event that is emitted when a response is created. abstract TvisitError(BetaResponseErrorEvent error)Emitted when an error occurs. abstract TvisitResponseFileSearchCallCompleted(BetaResponseFileSearchCallCompletedEvent responseFileSearchCallCompleted)Emitted when a file search call is completed (results found). abstract TvisitResponseFileSearchCallInProgress(BetaResponseFileSearchCallInProgressEvent responseFileSearchCallInProgress)Emitted when a file search call is initiated. abstract TvisitResponseFileSearchCallSearching(BetaResponseFileSearchCallSearchingEvent responseFileSearchCallSearching)Emitted when a file search is currently searching. abstract TvisitResponseFunctionCallArgumentsDelta(BetaResponseFunctionCallArgumentsDeltaEvent responseFunctionCallArgumentsDelta)Emitted when there is a partial function-call arguments delta. abstract TvisitResponseFunctionCallArgumentsDone(BetaResponseFunctionCallArgumentsDoneEvent responseFunctionCallArgumentsDone)Emitted when function-call arguments are finalized. abstract TvisitResponseInProgress(BetaResponseInProgressEvent responseInProgress)Emitted when the response is in progress. abstract TvisitResponseFailed(BetaResponseFailedEvent responseFailed)An event that is emitted when a response fails. abstract TvisitResponseIncomplete(BetaResponseIncompleteEvent responseIncomplete)An event that is emitted when a response finishes as incomplete. abstract TvisitResponseOutputItemAdded(BetaResponseOutputItemAddedEvent responseOutputItemAdded)Emitted when a new output item is added. abstract TvisitResponseOutputItemDone(BetaResponseOutputItemDoneEvent responseOutputItemDone)Emitted when an output item is marked done. abstract TvisitResponseReasoningSummaryPartAdded(BetaResponseReasoningSummaryPartAddedEvent responseReasoningSummaryPartAdded)Emitted when a new reasoning summary part is added. abstract TvisitResponseReasoningSummaryPartDone(BetaResponseReasoningSummaryPartDoneEvent responseReasoningSummaryPartDone)Emitted when a reasoning summary part is completed. abstract TvisitResponseReasoningSummaryTextDelta(BetaResponseReasoningSummaryTextDeltaEvent responseReasoningSummaryTextDelta)Emitted when a delta is added to a reasoning summary text. abstract TvisitResponseReasoningSummaryTextDone(BetaResponseReasoningSummaryTextDoneEvent responseReasoningSummaryTextDone)Emitted when a reasoning summary text is completed. abstract TvisitResponseReasoningTextDelta(BetaResponseReasoningTextDeltaEvent responseReasoningTextDelta)Emitted when a delta is added to a reasoning text. abstract TvisitResponseReasoningTextDone(BetaResponseReasoningTextDoneEvent responseReasoningTextDone)Emitted when a reasoning text is completed. abstract TvisitResponseRefusalDelta(BetaResponseRefusalDeltaEvent responseRefusalDelta)Emitted when there is a partial refusal text. abstract TvisitResponseRefusalDone(BetaResponseRefusalDoneEvent responseRefusalDone)Emitted when refusal text is finalized. abstract TvisitResponseOutputTextDelta(BetaResponseTextDeltaEvent responseOutputTextDelta)Emitted when there is an additional text delta. abstract TvisitResponseOutputTextDone(BetaResponseTextDoneEvent responseOutputTextDone)Emitted when text content is finalized. abstract TvisitResponseWebSearchCallCompleted(BetaResponseWebSearchCallCompletedEvent responseWebSearchCallCompleted)Emitted when a web search call is completed. abstract TvisitResponseWebSearchCallInProgress(BetaResponseWebSearchCallInProgressEvent responseWebSearchCallInProgress)Emitted when a web search call is initiated. abstract TvisitResponseWebSearchCallSearching(BetaResponseWebSearchCallSearchingEvent responseWebSearchCallSearching)Emitted when a web search call is executing. abstract TvisitResponseImageGenerationCallCompleted(BetaResponseImageGenCallCompletedEvent responseImageGenerationCallCompleted)Emitted when an image generation tool call has completed and the final image is available. abstract TvisitResponseImageGenerationCallGenerating(BetaResponseImageGenCallGeneratingEvent responseImageGenerationCallGenerating)Emitted when an image generation tool call is actively generating an image (intermediate state). abstract TvisitResponseImageGenerationCallInProgress(BetaResponseImageGenCallInProgressEvent responseImageGenerationCallInProgress)Emitted when an image generation tool call is in progress. abstract TvisitResponseImageGenerationCallPartialImage(BetaResponseImageGenCallPartialImageEvent responseImageGenerationCallPartialImage)Emitted when a partial image is available during image generation streaming. abstract TvisitResponseMcpCallArgumentsDelta(BetaResponseMcpCallArgumentsDeltaEvent responseMcpCallArgumentsDelta)Emitted when there is a delta (partial update) to the arguments of an MCP tool call. abstract TvisitResponseMcpCallArgumentsDone(BetaResponseMcpCallArgumentsDoneEvent responseMcpCallArgumentsDone)Emitted when the arguments for an MCP tool call are finalized. abstract TvisitResponseMcpCallCompleted(BetaResponseMcpCallCompletedEvent responseMcpCallCompleted)Emitted when an MCP tool call has completed successfully. abstract TvisitResponseMcpCallFailed(BetaResponseMcpCallFailedEvent responseMcpCallFailed)Emitted when an MCP tool call has failed. abstract TvisitResponseMcpCallInProgress(BetaResponseMcpCallInProgressEvent responseMcpCallInProgress)Emitted when an MCP tool call is in progress. abstract TvisitResponseMcpListToolsCompleted(BetaResponseMcpListToolsCompletedEvent responseMcpListToolsCompleted)Emitted when the list of available MCP tools has been successfully retrieved. abstract TvisitResponseMcpListToolsFailed(BetaResponseMcpListToolsFailedEvent responseMcpListToolsFailed)Emitted when the attempt to list available MCP tools has failed. abstract TvisitResponseMcpListToolsInProgress(BetaResponseMcpListToolsInProgressEvent responseMcpListToolsInProgress)Emitted when the system is in the process of retrieving the list of available MCP tools. abstract TvisitResponseOutputTextAnnotationAdded(BetaResponseOutputTextAnnotationAddedEvent responseOutputTextAnnotationAdded)Emitted when an annotation is added to output text content. abstract TvisitResponseQueued(BetaResponseQueuedEvent responseQueued)Emitted when a response is queued and waiting to be processed. abstract TvisitResponseCustomToolCallInputDelta(BetaResponseCustomToolCallInputDeltaEvent responseCustomToolCallInputDelta)Event representing a delta (partial update) to the input of a custom tool call. abstract TvisitResponseCustomToolCallInputDone(BetaResponseCustomToolCallInputDoneEvent responseCustomToolCallInputDone)Event indicating that input for a custom tool call is complete. Tunknown(JsonValue json)Maps an unknown variant of BetaResponseStreamEvent to a value of type T. -
-
Method Detail
-
visitResponseAudioDelta
abstract T visitResponseAudioDelta(BetaResponseAudioDeltaEvent responseAudioDelta)
Emitted when there is a partial audio response.
-
visitResponseAudioDone
abstract T visitResponseAudioDone(BetaResponseAudioDoneEvent responseAudioDone)
Emitted when the audio response is complete.
-
visitResponseAudioTranscriptDelta
abstract T visitResponseAudioTranscriptDelta(BetaResponseAudioTranscriptDeltaEvent responseAudioTranscriptDelta)
Emitted when there is a partial transcript of audio.
-
visitResponseAudioTranscriptDone
abstract T visitResponseAudioTranscriptDone(BetaResponseAudioTranscriptDoneEvent responseAudioTranscriptDone)
Emitted when the full audio transcript is completed.
-
visitResponseCodeInterpreterCallCodeDelta
abstract T visitResponseCodeInterpreterCallCodeDelta(BetaResponseCodeInterpreterCallCodeDeltaEvent responseCodeInterpreterCallCodeDelta)
Emitted when a partial code snippet is streamed by the code interpreter.
-
visitResponseCodeInterpreterCallCodeDone
abstract T visitResponseCodeInterpreterCallCodeDone(BetaResponseCodeInterpreterCallCodeDoneEvent responseCodeInterpreterCallCodeDone)
Emitted when the code snippet is finalized by the code interpreter.
-
visitResponseCodeInterpreterCallCompleted
abstract T visitResponseCodeInterpreterCallCompleted(BetaResponseCodeInterpreterCallCompletedEvent responseCodeInterpreterCallCompleted)
Emitted when the code interpreter call is completed.
-
visitResponseCodeInterpreterCallInProgress
abstract T visitResponseCodeInterpreterCallInProgress(BetaResponseCodeInterpreterCallInProgressEvent responseCodeInterpreterCallInProgress)
Emitted when a code interpreter call is in progress.
-
visitResponseCodeInterpreterCallInterpreting
abstract T visitResponseCodeInterpreterCallInterpreting(BetaResponseCodeInterpreterCallInterpretingEvent responseCodeInterpreterCallInterpreting)
Emitted when the code interpreter is actively interpreting the code snippet.
-
visitResponseCompleted
abstract T visitResponseCompleted(BetaResponseCompletedEvent responseCompleted)
Emitted when the model response is complete.
-
visitResponseContentPartAdded
abstract T visitResponseContentPartAdded(BetaResponseContentPartAddedEvent responseContentPartAdded)
Emitted when a new content part is added.
-
visitResponseContentPartDone
abstract T visitResponseContentPartDone(BetaResponseContentPartDoneEvent responseContentPartDone)
Emitted when a content part is done.
-
visitResponseCreated
abstract T visitResponseCreated(BetaResponseCreatedEvent responseCreated)
An event that is emitted when a response is created.
-
visitError
abstract T visitError(BetaResponseErrorEvent error)
Emitted when an error occurs.
-
visitResponseFileSearchCallCompleted
abstract T visitResponseFileSearchCallCompleted(BetaResponseFileSearchCallCompletedEvent responseFileSearchCallCompleted)
Emitted when a file search call is completed (results found).
-
visitResponseFileSearchCallInProgress
abstract T visitResponseFileSearchCallInProgress(BetaResponseFileSearchCallInProgressEvent responseFileSearchCallInProgress)
Emitted when a file search call is initiated.
-
visitResponseFileSearchCallSearching
abstract T visitResponseFileSearchCallSearching(BetaResponseFileSearchCallSearchingEvent responseFileSearchCallSearching)
Emitted when a file search is currently searching.
-
visitResponseFunctionCallArgumentsDelta
abstract T visitResponseFunctionCallArgumentsDelta(BetaResponseFunctionCallArgumentsDeltaEvent responseFunctionCallArgumentsDelta)
Emitted when there is a partial function-call arguments delta.
-
visitResponseFunctionCallArgumentsDone
abstract T visitResponseFunctionCallArgumentsDone(BetaResponseFunctionCallArgumentsDoneEvent responseFunctionCallArgumentsDone)
Emitted when function-call arguments are finalized.
-
visitResponseInProgress
abstract T visitResponseInProgress(BetaResponseInProgressEvent responseInProgress)
Emitted when the response is in progress.
-
visitResponseFailed
abstract T visitResponseFailed(BetaResponseFailedEvent responseFailed)
An event that is emitted when a response fails.
-
visitResponseIncomplete
abstract T visitResponseIncomplete(BetaResponseIncompleteEvent responseIncomplete)
An event that is emitted when a response finishes as incomplete.
-
visitResponseOutputItemAdded
abstract T visitResponseOutputItemAdded(BetaResponseOutputItemAddedEvent responseOutputItemAdded)
Emitted when a new output item is added.
-
visitResponseOutputItemDone
abstract T visitResponseOutputItemDone(BetaResponseOutputItemDoneEvent responseOutputItemDone)
Emitted when an output item is marked done.
-
visitResponseReasoningSummaryPartAdded
abstract T visitResponseReasoningSummaryPartAdded(BetaResponseReasoningSummaryPartAddedEvent responseReasoningSummaryPartAdded)
Emitted when a new reasoning summary part is added.
-
visitResponseReasoningSummaryPartDone
abstract T visitResponseReasoningSummaryPartDone(BetaResponseReasoningSummaryPartDoneEvent responseReasoningSummaryPartDone)
Emitted when a reasoning summary part is completed.
-
visitResponseReasoningSummaryTextDelta
abstract T visitResponseReasoningSummaryTextDelta(BetaResponseReasoningSummaryTextDeltaEvent responseReasoningSummaryTextDelta)
Emitted when a delta is added to a reasoning summary text.
-
visitResponseReasoningSummaryTextDone
abstract T visitResponseReasoningSummaryTextDone(BetaResponseReasoningSummaryTextDoneEvent responseReasoningSummaryTextDone)
Emitted when a reasoning summary text is completed.
-
visitResponseReasoningTextDelta
abstract T visitResponseReasoningTextDelta(BetaResponseReasoningTextDeltaEvent responseReasoningTextDelta)
Emitted when a delta is added to a reasoning text.
-
visitResponseReasoningTextDone
abstract T visitResponseReasoningTextDone(BetaResponseReasoningTextDoneEvent responseReasoningTextDone)
Emitted when a reasoning text is completed.
-
visitResponseRefusalDelta
abstract T visitResponseRefusalDelta(BetaResponseRefusalDeltaEvent responseRefusalDelta)
Emitted when there is a partial refusal text.
-
visitResponseRefusalDone
abstract T visitResponseRefusalDone(BetaResponseRefusalDoneEvent responseRefusalDone)
Emitted when refusal text is finalized.
-
visitResponseOutputTextDelta
abstract T visitResponseOutputTextDelta(BetaResponseTextDeltaEvent responseOutputTextDelta)
Emitted when there is an additional text delta.
-
visitResponseOutputTextDone
abstract T visitResponseOutputTextDone(BetaResponseTextDoneEvent responseOutputTextDone)
Emitted when text content is finalized.
-
visitResponseWebSearchCallCompleted
abstract T visitResponseWebSearchCallCompleted(BetaResponseWebSearchCallCompletedEvent responseWebSearchCallCompleted)
Emitted when a web search call is completed.
-
visitResponseWebSearchCallInProgress
abstract T visitResponseWebSearchCallInProgress(BetaResponseWebSearchCallInProgressEvent responseWebSearchCallInProgress)
Emitted when a web search call is initiated.
-
visitResponseWebSearchCallSearching
abstract T visitResponseWebSearchCallSearching(BetaResponseWebSearchCallSearchingEvent responseWebSearchCallSearching)
Emitted when a web search call is executing.
-
visitResponseImageGenerationCallCompleted
abstract T visitResponseImageGenerationCallCompleted(BetaResponseImageGenCallCompletedEvent responseImageGenerationCallCompleted)
Emitted when an image generation tool call has completed and the final image is available.
-
visitResponseImageGenerationCallGenerating
abstract T visitResponseImageGenerationCallGenerating(BetaResponseImageGenCallGeneratingEvent responseImageGenerationCallGenerating)
Emitted when an image generation tool call is actively generating an image (intermediate state).
-
visitResponseImageGenerationCallInProgress
abstract T visitResponseImageGenerationCallInProgress(BetaResponseImageGenCallInProgressEvent responseImageGenerationCallInProgress)
Emitted when an image generation tool call is in progress.
-
visitResponseImageGenerationCallPartialImage
abstract T visitResponseImageGenerationCallPartialImage(BetaResponseImageGenCallPartialImageEvent responseImageGenerationCallPartialImage)
Emitted when a partial image is available during image generation streaming.
-
visitResponseMcpCallArgumentsDelta
abstract T visitResponseMcpCallArgumentsDelta(BetaResponseMcpCallArgumentsDeltaEvent responseMcpCallArgumentsDelta)
Emitted when there is a delta (partial update) to the arguments of an MCP tool call.
-
visitResponseMcpCallArgumentsDone
abstract T visitResponseMcpCallArgumentsDone(BetaResponseMcpCallArgumentsDoneEvent responseMcpCallArgumentsDone)
Emitted when the arguments for an MCP tool call are finalized.
-
visitResponseMcpCallCompleted
abstract T visitResponseMcpCallCompleted(BetaResponseMcpCallCompletedEvent responseMcpCallCompleted)
Emitted when an MCP tool call has completed successfully.
-
visitResponseMcpCallFailed
abstract T visitResponseMcpCallFailed(BetaResponseMcpCallFailedEvent responseMcpCallFailed)
Emitted when an MCP tool call has failed.
-
visitResponseMcpCallInProgress
abstract T visitResponseMcpCallInProgress(BetaResponseMcpCallInProgressEvent responseMcpCallInProgress)
Emitted when an MCP tool call is in progress.
-
visitResponseMcpListToolsCompleted
abstract T visitResponseMcpListToolsCompleted(BetaResponseMcpListToolsCompletedEvent responseMcpListToolsCompleted)
Emitted when the list of available MCP tools has been successfully retrieved.
-
visitResponseMcpListToolsFailed
abstract T visitResponseMcpListToolsFailed(BetaResponseMcpListToolsFailedEvent responseMcpListToolsFailed)
Emitted when the attempt to list available MCP tools has failed.
-
visitResponseMcpListToolsInProgress
abstract T visitResponseMcpListToolsInProgress(BetaResponseMcpListToolsInProgressEvent responseMcpListToolsInProgress)
Emitted when the system is in the process of retrieving the list of available MCP tools.
-
visitResponseOutputTextAnnotationAdded
abstract T visitResponseOutputTextAnnotationAdded(BetaResponseOutputTextAnnotationAddedEvent responseOutputTextAnnotationAdded)
Emitted when an annotation is added to output text content.
-
visitResponseQueued
abstract T visitResponseQueued(BetaResponseQueuedEvent responseQueued)
Emitted when a response is queued and waiting to be processed.
-
visitResponseCustomToolCallInputDelta
abstract T visitResponseCustomToolCallInputDelta(BetaResponseCustomToolCallInputDeltaEvent responseCustomToolCallInputDelta)
Event representing a delta (partial update) to the input of a custom tool call.
-
visitResponseCustomToolCallInputDone
abstract T visitResponseCustomToolCallInputDone(BetaResponseCustomToolCallInputDoneEvent responseCustomToolCallInputDone)
Event indicating that input for a custom tool call is complete.
-
unknown
T unknown(JsonValue json)
Maps an unknown variant of BetaResponseStreamEvent to a value of type T.
An instance of BetaResponseStreamEvent 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.
-
-
-
-