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 Summary
Modifier 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 added by the code interpreter. abstract TvisitCodeInterpreterCallCodeDone(ResponseCodeInterpreterCallCodeDoneEvent codeInterpreterCallCodeDone)Emitted when code snippet output 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 TvisitRefusalDelta(ResponseRefusalDeltaEvent refusalDelta)Emitted when there is a partial refusal text. abstract TvisitRefusalDone(ResponseRefusalDoneEvent refusalDone)Emitted when refusal text is finalized. abstract TvisitOutputTextAnnotationAdded(ResponseTextAnnotationDeltaEvent outputTextAnnotationAdded)Emitted when a text annotation is added. 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. Tunknown(JsonValue json)Maps an unknown variant of ResponseStreamEvent to a value of type T. -
-
Method Detail
-
visitAudioDelta
abstract T visitAudioDelta(ResponseAudioDeltaEvent audioDelta)
Emitted when there is a partial audio response.
-
visitAudioDone
abstract T visitAudioDone(ResponseAudioDoneEvent audioDone)
Emitted when the audio response is complete.
-
visitAudioTranscriptDelta
abstract T visitAudioTranscriptDelta(ResponseAudioTranscriptDeltaEvent audioTranscriptDelta)
Emitted when there is a partial transcript of audio.
-
visitAudioTranscriptDone
abstract T visitAudioTranscriptDone(ResponseAudioTranscriptDoneEvent audioTranscriptDone)
Emitted when the full audio transcript is completed.
-
visitCodeInterpreterCallCodeDelta
abstract T visitCodeInterpreterCallCodeDelta(ResponseCodeInterpreterCallCodeDeltaEvent codeInterpreterCallCodeDelta)
Emitted when a partial code snippet is added by the code interpreter.
-
visitCodeInterpreterCallCodeDone
abstract T visitCodeInterpreterCallCodeDone(ResponseCodeInterpreterCallCodeDoneEvent codeInterpreterCallCodeDone)
Emitted when code snippet output is finalized by the code interpreter.
-
visitCodeInterpreterCallCompleted
abstract T visitCodeInterpreterCallCompleted(ResponseCodeInterpreterCallCompletedEvent codeInterpreterCallCompleted)
Emitted when the code interpreter call is completed.
-
visitCodeInterpreterCallInProgress
abstract T visitCodeInterpreterCallInProgress(ResponseCodeInterpreterCallInProgressEvent codeInterpreterCallInProgress)
Emitted when a code interpreter call is in progress.
-
visitCodeInterpreterCallInterpreting
abstract T visitCodeInterpreterCallInterpreting(ResponseCodeInterpreterCallInterpretingEvent codeInterpreterCallInterpreting)
Emitted when the code interpreter is actively interpreting the code snippet.
-
visitCompleted
abstract T visitCompleted(ResponseCompletedEvent completed)
Emitted when the model response is complete.
-
visitContentPartAdded
abstract T visitContentPartAdded(ResponseContentPartAddedEvent contentPartAdded)
Emitted when a new content part is added.
-
visitContentPartDone
abstract T visitContentPartDone(ResponseContentPartDoneEvent contentPartDone)
Emitted when a content part is done.
-
visitCreated
abstract T visitCreated(ResponseCreatedEvent created)
An event that is emitted when a response is created.
-
visitError
abstract T visitError(ResponseErrorEvent error)
Emitted when an error occurs.
-
visitFileSearchCallCompleted
abstract T visitFileSearchCallCompleted(ResponseFileSearchCallCompletedEvent fileSearchCallCompleted)
Emitted when a file search call is completed (results found).
-
visitFileSearchCallInProgress
abstract T visitFileSearchCallInProgress(ResponseFileSearchCallInProgressEvent fileSearchCallInProgress)
Emitted when a file search call is initiated.
-
visitFileSearchCallSearching
abstract T visitFileSearchCallSearching(ResponseFileSearchCallSearchingEvent fileSearchCallSearching)
Emitted when a file search is currently searching.
-
visitFunctionCallArgumentsDelta
abstract T visitFunctionCallArgumentsDelta(ResponseFunctionCallArgumentsDeltaEvent functionCallArgumentsDelta)
Emitted when there is a partial function-call arguments delta.
-
visitFunctionCallArgumentsDone
abstract T visitFunctionCallArgumentsDone(ResponseFunctionCallArgumentsDoneEvent functionCallArgumentsDone)
Emitted when function-call arguments are finalized.
-
visitInProgress
abstract T visitInProgress(ResponseInProgressEvent inProgress)
Emitted when the response is in progress.
-
visitFailed
abstract T visitFailed(ResponseFailedEvent failed)
An event that is emitted when a response fails.
-
visitIncomplete
abstract T visitIncomplete(ResponseIncompleteEvent incomplete)
An event that is emitted when a response finishes as incomplete.
-
visitOutputItemAdded
abstract T visitOutputItemAdded(ResponseOutputItemAddedEvent outputItemAdded)
Emitted when a new output item is added.
-
visitOutputItemDone
abstract T visitOutputItemDone(ResponseOutputItemDoneEvent outputItemDone)
Emitted when an output item is marked done.
-
visitRefusalDelta
abstract T visitRefusalDelta(ResponseRefusalDeltaEvent refusalDelta)
Emitted when there is a partial refusal text.
-
visitRefusalDone
abstract T visitRefusalDone(ResponseRefusalDoneEvent refusalDone)
Emitted when refusal text is finalized.
-
visitOutputTextAnnotationAdded
abstract T visitOutputTextAnnotationAdded(ResponseTextAnnotationDeltaEvent outputTextAnnotationAdded)
Emitted when a text annotation is added.
-
visitOutputTextDelta
abstract T visitOutputTextDelta(ResponseTextDeltaEvent outputTextDelta)
Emitted when there is an additional text delta.
-
visitOutputTextDone
abstract T visitOutputTextDone(ResponseTextDoneEvent outputTextDone)
Emitted when text content is finalized.
-
visitWebSearchCallCompleted
abstract T visitWebSearchCallCompleted(ResponseWebSearchCallCompletedEvent webSearchCallCompleted)
Emitted when a web search call is completed.
-
visitWebSearchCallInProgress
abstract T visitWebSearchCallInProgress(ResponseWebSearchCallInProgressEvent webSearchCallInProgress)
Emitted when a web search call is initiated.
-
visitWebSearchCallSearching
abstract T visitWebSearchCallSearching(ResponseWebSearchCallSearchingEvent webSearchCallSearching)
Emitted when a web search call is executing.
-
unknown
T 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.
-
-
-
-