Class BetaResponsesServerEvent
-
- All Implemented Interfaces:
public final class BetaResponsesServerEventServer events emitted by the Responses WebSocket server.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceBetaResponsesServerEvent.VisitorAn interface that defines how to map each variant of BetaResponsesServerEvent to a value of type T.
-
Method Summary
-
-
Method Detail
-
responseAudioDelta
final Optional<BetaResponseAudioDeltaEvent> responseAudioDelta()
Emitted when there is a partial audio response.
-
responseAudioDone
final Optional<BetaResponseAudioDoneEvent> responseAudioDone()
Emitted when the audio response is complete.
-
responseAudioTranscriptDelta
final Optional<BetaResponseAudioTranscriptDeltaEvent> responseAudioTranscriptDelta()
Emitted when there is a partial transcript of audio.
-
responseAudioTranscriptDone
final Optional<BetaResponseAudioTranscriptDoneEvent> responseAudioTranscriptDone()
Emitted when the full audio transcript is completed.
-
responseCodeInterpreterCallCodeDelta
final Optional<BetaResponseCodeInterpreterCallCodeDeltaEvent> responseCodeInterpreterCallCodeDelta()
Emitted when a partial code snippet is streamed by the code interpreter.
-
responseCodeInterpreterCallCodeDone
final Optional<BetaResponseCodeInterpreterCallCodeDoneEvent> responseCodeInterpreterCallCodeDone()
Emitted when the code snippet is finalized by the code interpreter.
-
responseCodeInterpreterCallCompleted
final Optional<BetaResponseCodeInterpreterCallCompletedEvent> responseCodeInterpreterCallCompleted()
Emitted when the code interpreter call is completed.
-
responseCodeInterpreterCallInProgress
final Optional<BetaResponseCodeInterpreterCallInProgressEvent> responseCodeInterpreterCallInProgress()
Emitted when a code interpreter call is in progress.
-
responseCodeInterpreterCallInterpreting
final Optional<BetaResponseCodeInterpreterCallInterpretingEvent> responseCodeInterpreterCallInterpreting()
Emitted when the code interpreter is actively interpreting the code snippet.
-
responseCompleted
final Optional<BetaResponseCompletedEvent> responseCompleted()
Emitted when the model response is complete.
-
responseContentPartAdded
final Optional<BetaResponseContentPartAddedEvent> responseContentPartAdded()
Emitted when a new content part is added.
-
responseContentPartDone
final Optional<BetaResponseContentPartDoneEvent> responseContentPartDone()
Emitted when a content part is done.
-
responseCreated
final Optional<BetaResponseCreatedEvent> responseCreated()
An event that is emitted when a response is created.
-
error
final Optional<BetaResponseErrorEvent> error()
Emitted when an error occurs.
-
responseFileSearchCallCompleted
final Optional<BetaResponseFileSearchCallCompletedEvent> responseFileSearchCallCompleted()
Emitted when a file search call is completed (results found).
-
responseFileSearchCallInProgress
final Optional<BetaResponseFileSearchCallInProgressEvent> responseFileSearchCallInProgress()
Emitted when a file search call is initiated.
-
responseFileSearchCallSearching
final Optional<BetaResponseFileSearchCallSearchingEvent> responseFileSearchCallSearching()
Emitted when a file search is currently searching.
-
responseFunctionCallArgumentsDelta
final Optional<BetaResponseFunctionCallArgumentsDeltaEvent> responseFunctionCallArgumentsDelta()
Emitted when there is a partial function-call arguments delta.
-
responseFunctionCallArgumentsDone
final Optional<BetaResponseFunctionCallArgumentsDoneEvent> responseFunctionCallArgumentsDone()
Emitted when function-call arguments are finalized.
-
responseInProgress
final Optional<BetaResponseInProgressEvent> responseInProgress()
Emitted when the response is in progress.
-
responseFailed
final Optional<BetaResponseFailedEvent> responseFailed()
An event that is emitted when a response fails.
-
responseIncomplete
final Optional<BetaResponseIncompleteEvent> responseIncomplete()
An event that is emitted when a response finishes as incomplete.
-
responseOutputItemAdded
final Optional<BetaResponseOutputItemAddedEvent> responseOutputItemAdded()
Emitted when a new output item is added.
-
responseOutputItemDone
final Optional<BetaResponseOutputItemDoneEvent> responseOutputItemDone()
Emitted when an output item is marked done.
-
responseReasoningSummaryPartAdded
final Optional<BetaResponseReasoningSummaryPartAddedEvent> responseReasoningSummaryPartAdded()
Emitted when a new reasoning summary part is added.
-
responseReasoningSummaryPartDone
final Optional<BetaResponseReasoningSummaryPartDoneEvent> responseReasoningSummaryPartDone()
Emitted when a reasoning summary part is completed.
-
responseReasoningSummaryTextDelta
final Optional<BetaResponseReasoningSummaryTextDeltaEvent> responseReasoningSummaryTextDelta()
Emitted when a delta is added to a reasoning summary text.
-
responseReasoningSummaryTextDone
final Optional<BetaResponseReasoningSummaryTextDoneEvent> responseReasoningSummaryTextDone()
Emitted when a reasoning summary text is completed.
-
responseReasoningTextDelta
final Optional<BetaResponseReasoningTextDeltaEvent> responseReasoningTextDelta()
Emitted when a delta is added to a reasoning text.
-
responseReasoningTextDone
final Optional<BetaResponseReasoningTextDoneEvent> responseReasoningTextDone()
Emitted when a reasoning text is completed.
-
responseRefusalDelta
final Optional<BetaResponseRefusalDeltaEvent> responseRefusalDelta()
Emitted when there is a partial refusal text.
-
responseRefusalDone
final Optional<BetaResponseRefusalDoneEvent> responseRefusalDone()
Emitted when refusal text is finalized.
-
responseOutputTextDelta
final Optional<BetaResponseTextDeltaEvent> responseOutputTextDelta()
Emitted when there is an additional text delta.
-
responseOutputTextDone
final Optional<BetaResponseTextDoneEvent> responseOutputTextDone()
Emitted when text content is finalized.
-
responseWebSearchCallCompleted
final Optional<BetaResponseWebSearchCallCompletedEvent> responseWebSearchCallCompleted()
Emitted when a web search call is completed.
-
responseWebSearchCallInProgress
final Optional<BetaResponseWebSearchCallInProgressEvent> responseWebSearchCallInProgress()
Emitted when a web search call is initiated.
-
responseWebSearchCallSearching
final Optional<BetaResponseWebSearchCallSearchingEvent> responseWebSearchCallSearching()
Emitted when a web search call is executing.
-
responseImageGenerationCallCompleted
final Optional<BetaResponseImageGenCallCompletedEvent> responseImageGenerationCallCompleted()
Emitted when an image generation tool call has completed and the final image is available.
-
responseImageGenerationCallGenerating
final Optional<BetaResponseImageGenCallGeneratingEvent> responseImageGenerationCallGenerating()
Emitted when an image generation tool call is actively generating an image (intermediate state).
-
responseImageGenerationCallInProgress
final Optional<BetaResponseImageGenCallInProgressEvent> responseImageGenerationCallInProgress()
Emitted when an image generation tool call is in progress.
-
responseImageGenerationCallPartialImage
final Optional<BetaResponseImageGenCallPartialImageEvent> responseImageGenerationCallPartialImage()
Emitted when a partial image is available during image generation streaming.
-
responseMcpCallArgumentsDelta
final Optional<BetaResponseMcpCallArgumentsDeltaEvent> responseMcpCallArgumentsDelta()
Emitted when there is a delta (partial update) to the arguments of an MCP tool call.
-
responseMcpCallArgumentsDone
final Optional<BetaResponseMcpCallArgumentsDoneEvent> responseMcpCallArgumentsDone()
Emitted when the arguments for an MCP tool call are finalized.
-
responseMcpCallCompleted
final Optional<BetaResponseMcpCallCompletedEvent> responseMcpCallCompleted()
Emitted when an MCP tool call has completed successfully.
-
responseMcpCallFailed
final Optional<BetaResponseMcpCallFailedEvent> responseMcpCallFailed()
Emitted when an MCP tool call has failed.
-
responseMcpCallInProgress
final Optional<BetaResponseMcpCallInProgressEvent> responseMcpCallInProgress()
Emitted when an MCP tool call is in progress.
-
responseMcpListToolsCompleted
final Optional<BetaResponseMcpListToolsCompletedEvent> responseMcpListToolsCompleted()
Emitted when the list of available MCP tools has been successfully retrieved.
-
responseMcpListToolsFailed
final Optional<BetaResponseMcpListToolsFailedEvent> responseMcpListToolsFailed()
Emitted when the attempt to list available MCP tools has failed.
-
responseMcpListToolsInProgress
final Optional<BetaResponseMcpListToolsInProgressEvent> responseMcpListToolsInProgress()
Emitted when the system is in the process of retrieving the list of available MCP tools.
-
responseOutputTextAnnotationAdded
final Optional<BetaResponseOutputTextAnnotationAddedEvent> responseOutputTextAnnotationAdded()
Emitted when an annotation is added to output text content.
-
responseQueued
final Optional<BetaResponseQueuedEvent> responseQueued()
Emitted when a response is queued and waiting to be processed.
-
responseCustomToolCallInputDelta
final Optional<BetaResponseCustomToolCallInputDeltaEvent> responseCustomToolCallInputDelta()
Event representing a delta (partial update) to the input of a custom tool call.
-
responseCustomToolCallInputDone
final Optional<BetaResponseCustomToolCallInputDoneEvent> responseCustomToolCallInputDone()
Event indicating that input for a custom tool call is complete.
-
responseInjectCreated
final Optional<BetaResponseInjectCreatedEvent> responseInjectCreated()
Emitted when all injected input items were validated and committed to the active response.
-
responseInjectFailed
final Optional<BetaResponseInjectFailedEvent> responseInjectFailed()
Emitted when injected input could not be committed to a response. The event returns the uncommitted raw input so the client can retry it in another response when appropriate.
-
isResponseAudioDelta
final Boolean isResponseAudioDelta()
-
isResponseAudioDone
final Boolean isResponseAudioDone()
-
isResponseAudioTranscriptDelta
final Boolean isResponseAudioTranscriptDelta()
-
isResponseAudioTranscriptDone
final Boolean isResponseAudioTranscriptDone()
-
isResponseCodeInterpreterCallCodeDelta
final Boolean isResponseCodeInterpreterCallCodeDelta()
-
isResponseCodeInterpreterCallCodeDone
final Boolean isResponseCodeInterpreterCallCodeDone()
-
isResponseCodeInterpreterCallCompleted
final Boolean isResponseCodeInterpreterCallCompleted()
-
isResponseCodeInterpreterCallInProgress
final Boolean isResponseCodeInterpreterCallInProgress()
-
isResponseCodeInterpreterCallInterpreting
final Boolean isResponseCodeInterpreterCallInterpreting()
-
isResponseCompleted
final Boolean isResponseCompleted()
-
isResponseContentPartAdded
final Boolean isResponseContentPartAdded()
-
isResponseContentPartDone
final Boolean isResponseContentPartDone()
-
isResponseCreated
final Boolean isResponseCreated()
-
isResponseFileSearchCallCompleted
final Boolean isResponseFileSearchCallCompleted()
-
isResponseFileSearchCallInProgress
final Boolean isResponseFileSearchCallInProgress()
-
isResponseFileSearchCallSearching
final Boolean isResponseFileSearchCallSearching()
-
isResponseFunctionCallArgumentsDelta
final Boolean isResponseFunctionCallArgumentsDelta()
-
isResponseFunctionCallArgumentsDone
final Boolean isResponseFunctionCallArgumentsDone()
-
isResponseInProgress
final Boolean isResponseInProgress()
-
isResponseFailed
final Boolean isResponseFailed()
-
isResponseIncomplete
final Boolean isResponseIncomplete()
-
isResponseOutputItemAdded
final Boolean isResponseOutputItemAdded()
-
isResponseOutputItemDone
final Boolean isResponseOutputItemDone()
-
isResponseReasoningSummaryPartAdded
final Boolean isResponseReasoningSummaryPartAdded()
-
isResponseReasoningSummaryPartDone
final Boolean isResponseReasoningSummaryPartDone()
-
isResponseReasoningSummaryTextDelta
final Boolean isResponseReasoningSummaryTextDelta()
-
isResponseReasoningSummaryTextDone
final Boolean isResponseReasoningSummaryTextDone()
-
isResponseReasoningTextDelta
final Boolean isResponseReasoningTextDelta()
-
isResponseReasoningTextDone
final Boolean isResponseReasoningTextDone()
-
isResponseRefusalDelta
final Boolean isResponseRefusalDelta()
-
isResponseRefusalDone
final Boolean isResponseRefusalDone()
-
isResponseOutputTextDelta
final Boolean isResponseOutputTextDelta()
-
isResponseOutputTextDone
final Boolean isResponseOutputTextDone()
-
isResponseWebSearchCallCompleted
final Boolean isResponseWebSearchCallCompleted()
-
isResponseWebSearchCallInProgress
final Boolean isResponseWebSearchCallInProgress()
-
isResponseWebSearchCallSearching
final Boolean isResponseWebSearchCallSearching()
-
isResponseImageGenerationCallCompleted
final Boolean isResponseImageGenerationCallCompleted()
-
isResponseImageGenerationCallGenerating
final Boolean isResponseImageGenerationCallGenerating()
-
isResponseImageGenerationCallInProgress
final Boolean isResponseImageGenerationCallInProgress()
-
isResponseImageGenerationCallPartialImage
final Boolean isResponseImageGenerationCallPartialImage()
-
isResponseMcpCallArgumentsDelta
final Boolean isResponseMcpCallArgumentsDelta()
-
isResponseMcpCallArgumentsDone
final Boolean isResponseMcpCallArgumentsDone()
-
isResponseMcpCallCompleted
final Boolean isResponseMcpCallCompleted()
-
isResponseMcpCallFailed
final Boolean isResponseMcpCallFailed()
-
isResponseMcpCallInProgress
final Boolean isResponseMcpCallInProgress()
-
isResponseMcpListToolsCompleted
final Boolean isResponseMcpListToolsCompleted()
-
isResponseMcpListToolsFailed
final Boolean isResponseMcpListToolsFailed()
-
isResponseMcpListToolsInProgress
final Boolean isResponseMcpListToolsInProgress()
-
isResponseOutputTextAnnotationAdded
final Boolean isResponseOutputTextAnnotationAdded()
-
isResponseQueued
final Boolean isResponseQueued()
-
isResponseCustomToolCallInputDelta
final Boolean isResponseCustomToolCallInputDelta()
-
isResponseCustomToolCallInputDone
final Boolean isResponseCustomToolCallInputDone()
-
isResponseInjectCreated
final Boolean isResponseInjectCreated()
-
isResponseInjectFailed
final Boolean isResponseInjectFailed()
-
asResponseAudioDelta
final BetaResponseAudioDeltaEvent asResponseAudioDelta()
Emitted when there is a partial audio response.
-
asResponseAudioDone
final BetaResponseAudioDoneEvent asResponseAudioDone()
Emitted when the audio response is complete.
-
asResponseAudioTranscriptDelta
final BetaResponseAudioTranscriptDeltaEvent asResponseAudioTranscriptDelta()
Emitted when there is a partial transcript of audio.
-
asResponseAudioTranscriptDone
final BetaResponseAudioTranscriptDoneEvent asResponseAudioTranscriptDone()
Emitted when the full audio transcript is completed.
-
asResponseCodeInterpreterCallCodeDelta
final BetaResponseCodeInterpreterCallCodeDeltaEvent asResponseCodeInterpreterCallCodeDelta()
Emitted when a partial code snippet is streamed by the code interpreter.
-
asResponseCodeInterpreterCallCodeDone
final BetaResponseCodeInterpreterCallCodeDoneEvent asResponseCodeInterpreterCallCodeDone()
Emitted when the code snippet is finalized by the code interpreter.
-
asResponseCodeInterpreterCallCompleted
final BetaResponseCodeInterpreterCallCompletedEvent asResponseCodeInterpreterCallCompleted()
Emitted when the code interpreter call is completed.
-
asResponseCodeInterpreterCallInProgress
final BetaResponseCodeInterpreterCallInProgressEvent asResponseCodeInterpreterCallInProgress()
Emitted when a code interpreter call is in progress.
-
asResponseCodeInterpreterCallInterpreting
final BetaResponseCodeInterpreterCallInterpretingEvent asResponseCodeInterpreterCallInterpreting()
Emitted when the code interpreter is actively interpreting the code snippet.
-
asResponseCompleted
final BetaResponseCompletedEvent asResponseCompleted()
Emitted when the model response is complete.
-
asResponseContentPartAdded
final BetaResponseContentPartAddedEvent asResponseContentPartAdded()
Emitted when a new content part is added.
-
asResponseContentPartDone
final BetaResponseContentPartDoneEvent asResponseContentPartDone()
Emitted when a content part is done.
-
asResponseCreated
final BetaResponseCreatedEvent asResponseCreated()
An event that is emitted when a response is created.
-
asError
final BetaResponseErrorEvent asError()
Emitted when an error occurs.
-
asResponseFileSearchCallCompleted
final BetaResponseFileSearchCallCompletedEvent asResponseFileSearchCallCompleted()
Emitted when a file search call is completed (results found).
-
asResponseFileSearchCallInProgress
final BetaResponseFileSearchCallInProgressEvent asResponseFileSearchCallInProgress()
Emitted when a file search call is initiated.
-
asResponseFileSearchCallSearching
final BetaResponseFileSearchCallSearchingEvent asResponseFileSearchCallSearching()
Emitted when a file search is currently searching.
-
asResponseFunctionCallArgumentsDelta
final BetaResponseFunctionCallArgumentsDeltaEvent asResponseFunctionCallArgumentsDelta()
Emitted when there is a partial function-call arguments delta.
-
asResponseFunctionCallArgumentsDone
final BetaResponseFunctionCallArgumentsDoneEvent asResponseFunctionCallArgumentsDone()
Emitted when function-call arguments are finalized.
-
asResponseInProgress
final BetaResponseInProgressEvent asResponseInProgress()
Emitted when the response is in progress.
-
asResponseFailed
final BetaResponseFailedEvent asResponseFailed()
An event that is emitted when a response fails.
-
asResponseIncomplete
final BetaResponseIncompleteEvent asResponseIncomplete()
An event that is emitted when a response finishes as incomplete.
-
asResponseOutputItemAdded
final BetaResponseOutputItemAddedEvent asResponseOutputItemAdded()
Emitted when a new output item is added.
-
asResponseOutputItemDone
final BetaResponseOutputItemDoneEvent asResponseOutputItemDone()
Emitted when an output item is marked done.
-
asResponseReasoningSummaryPartAdded
final BetaResponseReasoningSummaryPartAddedEvent asResponseReasoningSummaryPartAdded()
Emitted when a new reasoning summary part is added.
-
asResponseReasoningSummaryPartDone
final BetaResponseReasoningSummaryPartDoneEvent asResponseReasoningSummaryPartDone()
Emitted when a reasoning summary part is completed.
-
asResponseReasoningSummaryTextDelta
final BetaResponseReasoningSummaryTextDeltaEvent asResponseReasoningSummaryTextDelta()
Emitted when a delta is added to a reasoning summary text.
-
asResponseReasoningSummaryTextDone
final BetaResponseReasoningSummaryTextDoneEvent asResponseReasoningSummaryTextDone()
Emitted when a reasoning summary text is completed.
-
asResponseReasoningTextDelta
final BetaResponseReasoningTextDeltaEvent asResponseReasoningTextDelta()
Emitted when a delta is added to a reasoning text.
-
asResponseReasoningTextDone
final BetaResponseReasoningTextDoneEvent asResponseReasoningTextDone()
Emitted when a reasoning text is completed.
-
asResponseRefusalDelta
final BetaResponseRefusalDeltaEvent asResponseRefusalDelta()
Emitted when there is a partial refusal text.
-
asResponseRefusalDone
final BetaResponseRefusalDoneEvent asResponseRefusalDone()
Emitted when refusal text is finalized.
-
asResponseOutputTextDelta
final BetaResponseTextDeltaEvent asResponseOutputTextDelta()
Emitted when there is an additional text delta.
-
asResponseOutputTextDone
final BetaResponseTextDoneEvent asResponseOutputTextDone()
Emitted when text content is finalized.
-
asResponseWebSearchCallCompleted
final BetaResponseWebSearchCallCompletedEvent asResponseWebSearchCallCompleted()
Emitted when a web search call is completed.
-
asResponseWebSearchCallInProgress
final BetaResponseWebSearchCallInProgressEvent asResponseWebSearchCallInProgress()
Emitted when a web search call is initiated.
-
asResponseWebSearchCallSearching
final BetaResponseWebSearchCallSearchingEvent asResponseWebSearchCallSearching()
Emitted when a web search call is executing.
-
asResponseImageGenerationCallCompleted
final BetaResponseImageGenCallCompletedEvent asResponseImageGenerationCallCompleted()
Emitted when an image generation tool call has completed and the final image is available.
-
asResponseImageGenerationCallGenerating
final BetaResponseImageGenCallGeneratingEvent asResponseImageGenerationCallGenerating()
Emitted when an image generation tool call is actively generating an image (intermediate state).
-
asResponseImageGenerationCallInProgress
final BetaResponseImageGenCallInProgressEvent asResponseImageGenerationCallInProgress()
Emitted when an image generation tool call is in progress.
-
asResponseImageGenerationCallPartialImage
final BetaResponseImageGenCallPartialImageEvent asResponseImageGenerationCallPartialImage()
Emitted when a partial image is available during image generation streaming.
-
asResponseMcpCallArgumentsDelta
final BetaResponseMcpCallArgumentsDeltaEvent asResponseMcpCallArgumentsDelta()
Emitted when there is a delta (partial update) to the arguments of an MCP tool call.
-
asResponseMcpCallArgumentsDone
final BetaResponseMcpCallArgumentsDoneEvent asResponseMcpCallArgumentsDone()
Emitted when the arguments for an MCP tool call are finalized.
-
asResponseMcpCallCompleted
final BetaResponseMcpCallCompletedEvent asResponseMcpCallCompleted()
Emitted when an MCP tool call has completed successfully.
-
asResponseMcpCallFailed
final BetaResponseMcpCallFailedEvent asResponseMcpCallFailed()
Emitted when an MCP tool call has failed.
-
asResponseMcpCallInProgress
final BetaResponseMcpCallInProgressEvent asResponseMcpCallInProgress()
Emitted when an MCP tool call is in progress.
-
asResponseMcpListToolsCompleted
final BetaResponseMcpListToolsCompletedEvent asResponseMcpListToolsCompleted()
Emitted when the list of available MCP tools has been successfully retrieved.
-
asResponseMcpListToolsFailed
final BetaResponseMcpListToolsFailedEvent asResponseMcpListToolsFailed()
Emitted when the attempt to list available MCP tools has failed.
-
asResponseMcpListToolsInProgress
final BetaResponseMcpListToolsInProgressEvent asResponseMcpListToolsInProgress()
Emitted when the system is in the process of retrieving the list of available MCP tools.
-
asResponseOutputTextAnnotationAdded
final BetaResponseOutputTextAnnotationAddedEvent asResponseOutputTextAnnotationAdded()
Emitted when an annotation is added to output text content.
-
asResponseQueued
final BetaResponseQueuedEvent asResponseQueued()
Emitted when a response is queued and waiting to be processed.
-
asResponseCustomToolCallInputDelta
final BetaResponseCustomToolCallInputDeltaEvent asResponseCustomToolCallInputDelta()
Event representing a delta (partial update) to the input of a custom tool call.
-
asResponseCustomToolCallInputDone
final BetaResponseCustomToolCallInputDoneEvent asResponseCustomToolCallInputDone()
Event indicating that input for a custom tool call is complete.
-
asResponseInjectCreated
final BetaResponseInjectCreatedEvent asResponseInjectCreated()
Emitted when all injected input items were validated and committed to the active response.
-
asResponseInjectFailed
final BetaResponseInjectFailedEvent asResponseInjectFailed()
Emitted when injected input could not be committed to a response. The event returns the uncommitted raw input so the client can retry it in another response when appropriate.
-
accept
final <T extends Any> T accept(BetaResponsesServerEvent.Visitor<T> visitor)
Maps this instance's current variant to a value of type T using the given visitor.
Note that this method is not forwards compatible with new variants from the API, unless visitor overrides Visitor.unknown. To handle variants not known to this version of the SDK gracefully, consider overriding Visitor.unknown:
import com.openai.core.JsonValue; import java.util.Optional; Optional<String> result = betaResponsesServerEvent.accept(new BetaResponsesServerEvent.Visitor<Optional<String>>() { @Override public Optional<String> visitResponseAudioDelta(BetaResponseAudioDeltaEvent responseAudioDelta) { return Optional.of(responseAudioDelta.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final BetaResponsesServerEvent validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
ofResponseAudioDelta
final static BetaResponsesServerEvent ofResponseAudioDelta(BetaResponseAudioDeltaEvent responseAudioDelta)
Emitted when there is a partial audio response.
-
ofResponseAudioDone
final static BetaResponsesServerEvent ofResponseAudioDone(BetaResponseAudioDoneEvent responseAudioDone)
Emitted when the audio response is complete.
-
ofResponseAudioTranscriptDelta
final static BetaResponsesServerEvent ofResponseAudioTranscriptDelta(BetaResponseAudioTranscriptDeltaEvent responseAudioTranscriptDelta)
Emitted when there is a partial transcript of audio.
-
ofResponseAudioTranscriptDone
final static BetaResponsesServerEvent ofResponseAudioTranscriptDone(BetaResponseAudioTranscriptDoneEvent responseAudioTranscriptDone)
Emitted when the full audio transcript is completed.
-
ofResponseCodeInterpreterCallCodeDelta
final static BetaResponsesServerEvent ofResponseCodeInterpreterCallCodeDelta(BetaResponseCodeInterpreterCallCodeDeltaEvent responseCodeInterpreterCallCodeDelta)
Emitted when a partial code snippet is streamed by the code interpreter.
-
ofResponseCodeInterpreterCallCodeDone
final static BetaResponsesServerEvent ofResponseCodeInterpreterCallCodeDone(BetaResponseCodeInterpreterCallCodeDoneEvent responseCodeInterpreterCallCodeDone)
Emitted when the code snippet is finalized by the code interpreter.
-
ofResponseCodeInterpreterCallCompleted
final static BetaResponsesServerEvent ofResponseCodeInterpreterCallCompleted(BetaResponseCodeInterpreterCallCompletedEvent responseCodeInterpreterCallCompleted)
Emitted when the code interpreter call is completed.
-
ofResponseCodeInterpreterCallInProgress
final static BetaResponsesServerEvent ofResponseCodeInterpreterCallInProgress(BetaResponseCodeInterpreterCallInProgressEvent responseCodeInterpreterCallInProgress)
Emitted when a code interpreter call is in progress.
-
ofResponseCodeInterpreterCallInterpreting
final static BetaResponsesServerEvent ofResponseCodeInterpreterCallInterpreting(BetaResponseCodeInterpreterCallInterpretingEvent responseCodeInterpreterCallInterpreting)
Emitted when the code interpreter is actively interpreting the code snippet.
-
ofResponseCompleted
final static BetaResponsesServerEvent ofResponseCompleted(BetaResponseCompletedEvent responseCompleted)
Emitted when the model response is complete.
-
ofResponseContentPartAdded
final static BetaResponsesServerEvent ofResponseContentPartAdded(BetaResponseContentPartAddedEvent responseContentPartAdded)
Emitted when a new content part is added.
-
ofResponseContentPartDone
final static BetaResponsesServerEvent ofResponseContentPartDone(BetaResponseContentPartDoneEvent responseContentPartDone)
Emitted when a content part is done.
-
ofResponseCreated
final static BetaResponsesServerEvent ofResponseCreated(BetaResponseCreatedEvent responseCreated)
An event that is emitted when a response is created.
-
ofError
final static BetaResponsesServerEvent ofError(BetaResponseErrorEvent error)
Emitted when an error occurs.
-
ofResponseFileSearchCallCompleted
final static BetaResponsesServerEvent ofResponseFileSearchCallCompleted(BetaResponseFileSearchCallCompletedEvent responseFileSearchCallCompleted)
Emitted when a file search call is completed (results found).
-
ofResponseFileSearchCallInProgress
final static BetaResponsesServerEvent ofResponseFileSearchCallInProgress(BetaResponseFileSearchCallInProgressEvent responseFileSearchCallInProgress)
Emitted when a file search call is initiated.
-
ofResponseFileSearchCallSearching
final static BetaResponsesServerEvent ofResponseFileSearchCallSearching(BetaResponseFileSearchCallSearchingEvent responseFileSearchCallSearching)
Emitted when a file search is currently searching.
-
ofResponseFunctionCallArgumentsDelta
final static BetaResponsesServerEvent ofResponseFunctionCallArgumentsDelta(BetaResponseFunctionCallArgumentsDeltaEvent responseFunctionCallArgumentsDelta)
Emitted when there is a partial function-call arguments delta.
-
ofResponseFunctionCallArgumentsDone
final static BetaResponsesServerEvent ofResponseFunctionCallArgumentsDone(BetaResponseFunctionCallArgumentsDoneEvent responseFunctionCallArgumentsDone)
Emitted when function-call arguments are finalized.
-
ofResponseInProgress
final static BetaResponsesServerEvent ofResponseInProgress(BetaResponseInProgressEvent responseInProgress)
Emitted when the response is in progress.
-
ofResponseFailed
final static BetaResponsesServerEvent ofResponseFailed(BetaResponseFailedEvent responseFailed)
An event that is emitted when a response fails.
-
ofResponseIncomplete
final static BetaResponsesServerEvent ofResponseIncomplete(BetaResponseIncompleteEvent responseIncomplete)
An event that is emitted when a response finishes as incomplete.
-
ofResponseOutputItemAdded
final static BetaResponsesServerEvent ofResponseOutputItemAdded(BetaResponseOutputItemAddedEvent responseOutputItemAdded)
Emitted when a new output item is added.
-
ofResponseOutputItemDone
final static BetaResponsesServerEvent ofResponseOutputItemDone(BetaResponseOutputItemDoneEvent responseOutputItemDone)
Emitted when an output item is marked done.
-
ofResponseReasoningSummaryPartAdded
final static BetaResponsesServerEvent ofResponseReasoningSummaryPartAdded(BetaResponseReasoningSummaryPartAddedEvent responseReasoningSummaryPartAdded)
Emitted when a new reasoning summary part is added.
-
ofResponseReasoningSummaryPartDone
final static BetaResponsesServerEvent ofResponseReasoningSummaryPartDone(BetaResponseReasoningSummaryPartDoneEvent responseReasoningSummaryPartDone)
Emitted when a reasoning summary part is completed.
-
ofResponseReasoningSummaryTextDelta
final static BetaResponsesServerEvent ofResponseReasoningSummaryTextDelta(BetaResponseReasoningSummaryTextDeltaEvent responseReasoningSummaryTextDelta)
Emitted when a delta is added to a reasoning summary text.
-
ofResponseReasoningSummaryTextDone
final static BetaResponsesServerEvent ofResponseReasoningSummaryTextDone(BetaResponseReasoningSummaryTextDoneEvent responseReasoningSummaryTextDone)
Emitted when a reasoning summary text is completed.
-
ofResponseReasoningTextDelta
final static BetaResponsesServerEvent ofResponseReasoningTextDelta(BetaResponseReasoningTextDeltaEvent responseReasoningTextDelta)
Emitted when a delta is added to a reasoning text.
-
ofResponseReasoningTextDone
final static BetaResponsesServerEvent ofResponseReasoningTextDone(BetaResponseReasoningTextDoneEvent responseReasoningTextDone)
Emitted when a reasoning text is completed.
-
ofResponseRefusalDelta
final static BetaResponsesServerEvent ofResponseRefusalDelta(BetaResponseRefusalDeltaEvent responseRefusalDelta)
Emitted when there is a partial refusal text.
-
ofResponseRefusalDone
final static BetaResponsesServerEvent ofResponseRefusalDone(BetaResponseRefusalDoneEvent responseRefusalDone)
Emitted when refusal text is finalized.
-
ofResponseOutputTextDelta
final static BetaResponsesServerEvent ofResponseOutputTextDelta(BetaResponseTextDeltaEvent responseOutputTextDelta)
Emitted when there is an additional text delta.
-
ofResponseOutputTextDone
final static BetaResponsesServerEvent ofResponseOutputTextDone(BetaResponseTextDoneEvent responseOutputTextDone)
Emitted when text content is finalized.
-
ofResponseWebSearchCallCompleted
final static BetaResponsesServerEvent ofResponseWebSearchCallCompleted(BetaResponseWebSearchCallCompletedEvent responseWebSearchCallCompleted)
Emitted when a web search call is completed.
-
ofResponseWebSearchCallInProgress
final static BetaResponsesServerEvent ofResponseWebSearchCallInProgress(BetaResponseWebSearchCallInProgressEvent responseWebSearchCallInProgress)
Emitted when a web search call is initiated.
-
ofResponseWebSearchCallSearching
final static BetaResponsesServerEvent ofResponseWebSearchCallSearching(BetaResponseWebSearchCallSearchingEvent responseWebSearchCallSearching)
Emitted when a web search call is executing.
-
ofResponseImageGenerationCallCompleted
final static BetaResponsesServerEvent ofResponseImageGenerationCallCompleted(BetaResponseImageGenCallCompletedEvent responseImageGenerationCallCompleted)
Emitted when an image generation tool call has completed and the final image is available.
-
ofResponseImageGenerationCallGenerating
final static BetaResponsesServerEvent ofResponseImageGenerationCallGenerating(BetaResponseImageGenCallGeneratingEvent responseImageGenerationCallGenerating)
Emitted when an image generation tool call is actively generating an image (intermediate state).
-
ofResponseImageGenerationCallInProgress
final static BetaResponsesServerEvent ofResponseImageGenerationCallInProgress(BetaResponseImageGenCallInProgressEvent responseImageGenerationCallInProgress)
Emitted when an image generation tool call is in progress.
-
ofResponseImageGenerationCallPartialImage
final static BetaResponsesServerEvent ofResponseImageGenerationCallPartialImage(BetaResponseImageGenCallPartialImageEvent responseImageGenerationCallPartialImage)
Emitted when a partial image is available during image generation streaming.
-
ofResponseMcpCallArgumentsDelta
final static BetaResponsesServerEvent ofResponseMcpCallArgumentsDelta(BetaResponseMcpCallArgumentsDeltaEvent responseMcpCallArgumentsDelta)
Emitted when there is a delta (partial update) to the arguments of an MCP tool call.
-
ofResponseMcpCallArgumentsDone
final static BetaResponsesServerEvent ofResponseMcpCallArgumentsDone(BetaResponseMcpCallArgumentsDoneEvent responseMcpCallArgumentsDone)
Emitted when the arguments for an MCP tool call are finalized.
-
ofResponseMcpCallCompleted
final static BetaResponsesServerEvent ofResponseMcpCallCompleted(BetaResponseMcpCallCompletedEvent responseMcpCallCompleted)
Emitted when an MCP tool call has completed successfully.
-
ofResponseMcpCallFailed
final static BetaResponsesServerEvent ofResponseMcpCallFailed(BetaResponseMcpCallFailedEvent responseMcpCallFailed)
Emitted when an MCP tool call has failed.
-
ofResponseMcpCallInProgress
final static BetaResponsesServerEvent ofResponseMcpCallInProgress(BetaResponseMcpCallInProgressEvent responseMcpCallInProgress)
Emitted when an MCP tool call is in progress.
-
ofResponseMcpListToolsCompleted
final static BetaResponsesServerEvent ofResponseMcpListToolsCompleted(BetaResponseMcpListToolsCompletedEvent responseMcpListToolsCompleted)
Emitted when the list of available MCP tools has been successfully retrieved.
-
ofResponseMcpListToolsFailed
final static BetaResponsesServerEvent ofResponseMcpListToolsFailed(BetaResponseMcpListToolsFailedEvent responseMcpListToolsFailed)
Emitted when the attempt to list available MCP tools has failed.
-
ofResponseMcpListToolsInProgress
final static BetaResponsesServerEvent ofResponseMcpListToolsInProgress(BetaResponseMcpListToolsInProgressEvent responseMcpListToolsInProgress)
Emitted when the system is in the process of retrieving the list of available MCP tools.
-
ofResponseOutputTextAnnotationAdded
final static BetaResponsesServerEvent ofResponseOutputTextAnnotationAdded(BetaResponseOutputTextAnnotationAddedEvent responseOutputTextAnnotationAdded)
Emitted when an annotation is added to output text content.
-
ofResponseQueued
final static BetaResponsesServerEvent ofResponseQueued(BetaResponseQueuedEvent responseQueued)
Emitted when a response is queued and waiting to be processed.
-
ofResponseCustomToolCallInputDelta
final static BetaResponsesServerEvent ofResponseCustomToolCallInputDelta(BetaResponseCustomToolCallInputDeltaEvent responseCustomToolCallInputDelta)
Event representing a delta (partial update) to the input of a custom tool call.
-
ofResponseCustomToolCallInputDone
final static BetaResponsesServerEvent ofResponseCustomToolCallInputDone(BetaResponseCustomToolCallInputDoneEvent responseCustomToolCallInputDone)
Event indicating that input for a custom tool call is complete.
-
ofResponseInjectCreated
final static BetaResponsesServerEvent ofResponseInjectCreated(BetaResponseInjectCreatedEvent responseInjectCreated)
Emitted when all injected input items were validated and committed to the active response.
-
ofResponseInjectFailed
final static BetaResponsesServerEvent ofResponseInjectFailed(BetaResponseInjectFailedEvent responseInjectFailed)
Emitted when injected input could not be committed to a response. The event returns the uncommitted raw input so the client can retry it in another response when appropriate.
-
-
-
-