Package com.openai.models.beta.realtime
See: Description
-
Class Summary Class Description Builder A builder for ConversationCreatedEvent. Builder A builder for Conversation. Object The object type, must be realtime.conversation
.Conversation The conversation resource. ConversationCreatedEvent Returned when a conversation is created. Builder A builder for ConversationItem. Object Identifier for the API object being returned - always realtime.item
.Role The role of the message sender ( user
,assistant
,system
), only applicable formessage
items.Status The status of the item ( completed
,incomplete
,in_progress
).Type The type of the item ( message
,function_call
,function_call_output
).ConversationItem The item to add to the conversation. Builder A builder for ConversationItemContent. Type The content type ( input_text
,input_audio
,item_reference
,text
,audio
).ConversationItemContent Builder A builder for ConversationItemCreateEvent. ConversationItemCreateEvent Add a new Item to the Conversation's context, including messages, function calls, and function call responses. Builder A builder for ConversationItemCreatedEvent. ConversationItemCreatedEvent Returned when a conversation item is created. Builder A builder for ConversationItemDeleteEvent. ConversationItemDeleteEvent Send this event when you want to remove any item from the conversation history. Builder A builder for ConversationItemDeletedEvent. ConversationItemDeletedEvent Returned when an item in the conversation is deleted by the client with a conversation.item.delete
event.Builder A builder for ConversationItemInputAudioTranscriptionCompletedEvent. Builder A builder for TranscriptTextUsageTokens. Builder A builder for InputTokenDetails. InputTokenDetails Details about the input tokens billed for this request. TranscriptTextUsageTokens Usage statistics for models billed by token usage. Builder A builder for TranscriptTextUsageDuration. TranscriptTextUsageDuration Usage statistics for models billed by audio input duration. Usage Usage statistics for the transcription. Builder A builder for Logprob. Logprob A log probability object. ConversationItemInputAudioTranscriptionCompletedEvent This event is the output of audio transcription for user audio written to the user audio buffer. Builder A builder for ConversationItemInputAudioTranscriptionDeltaEvent. Builder A builder for Logprob. Logprob A log probability object. ConversationItemInputAudioTranscriptionDeltaEvent Returned when the text value of an input audio transcription content part is updated. Builder A builder for ConversationItemInputAudioTranscriptionFailedEvent. Builder A builder for Error. Error Details of the transcription error. ConversationItemInputAudioTranscriptionFailedEvent Returned when input audio transcription is configured, and a transcription request for a user message failed. Builder A builder for ConversationItemRetrieveEvent. ConversationItemRetrieveEvent Send this event when you want to retrieve the server's representation of a specific item in the conversation history. Builder A builder for ConversationItemTruncateEvent. ConversationItemTruncateEvent Send this event to truncate a previous assistant message’s audio. Builder A builder for ConversationItemTruncatedEvent. ConversationItemTruncatedEvent Returned when an earlier assistant audio message item is truncated by the client with a conversation.item.truncate
event.Builder A builder for ConversationItemWithReference. Builder A builder for Content. Type The content type ( input_text
,input_audio
,item_reference
,text
).Content Object Identifier for the API object being returned - always realtime.item
.Role The role of the message sender ( user
,assistant
,system
), only applicable formessage
items.Status The status of the item ( completed
,incomplete
,in_progress
).Type The type of the item ( message
,function_call
,function_call_output
,item_reference
).ConversationItemWithReference The item to add to the conversation. Builder A builder for ErrorEvent. Builder A builder for Error. Error Details of the error. ErrorEvent Returned when an error occurs, which could be a client problem or a server problem. Builder A builder for InputAudioBufferAppendEvent. InputAudioBufferAppendEvent Send this event to append audio bytes to the input audio buffer. Builder A builder for InputAudioBufferClearEvent. InputAudioBufferClearEvent Send this event to clear the audio bytes in the buffer. Builder A builder for InputAudioBufferClearedEvent. InputAudioBufferClearedEvent Returned when the input audio buffer is cleared by the client with a input_audio_buffer.clear
event.Builder A builder for InputAudioBufferCommitEvent. InputAudioBufferCommitEvent Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. Builder A builder for InputAudioBufferCommittedEvent. InputAudioBufferCommittedEvent Returned when an input audio buffer is committed, either by the client or automatically in server VAD mode. Builder A builder for InputAudioBufferSpeechStartedEvent. InputAudioBufferSpeechStartedEvent Sent by the server when in server_vad
mode to indicate that speech has been detected in the audio buffer.Builder A builder for InputAudioBufferSpeechStoppedEvent. InputAudioBufferSpeechStoppedEvent Returned in server_vad
mode when the server detects the end of speech in the audio buffer.Builder A builder for RateLimitsUpdatedEvent. Builder A builder for RateLimit. Name The name of the rate limit ( requests
,tokens
).RateLimit RateLimitsUpdatedEvent Emitted at the beginning of a Response to indicate the updated rate limits. Builder A builder for OutputAudioBufferClear. OutputAudioBufferClear WebRTC Only: Emit to cut off the current audio response. RealtimeClientEvent A realtime client event. Builder A builder for RealtimeResponse. MaxOutputTokens Maximum number of output tokens for a single assistant response, inclusive of tool calls, that was used in this response. Builder A builder for Metadata. Metadata Set of 16 key-value pairs that can be attached to an object. Modality Object The object type, must be realtime.response
.OutputAudioFormat The format of output audio. Status The final status of the response ( completed
,cancelled
,failed
, orincomplete
,in_progress
).Voice The voice the model used to respond. RealtimeResponse The response resource. Builder A builder for RealtimeResponseStatus. Builder A builder for Error. Error A description of the error that caused the response to fail, populated when the status
isfailed
.Reason The reason the Response did not complete. Type The type of error that caused the response to fail, corresponding with the status
field (completed
,cancelled
,incomplete
,failed
).RealtimeResponseStatus Additional details about the status. Builder A builder for RealtimeResponseUsage. Builder A builder for InputTokenDetails. InputTokenDetails Details about the input tokens used in the Response. Builder A builder for OutputTokenDetails. OutputTokenDetails Details about the output tokens used in the Response. RealtimeResponseUsage Usage statistics for the Response, this will correspond to billing. Builder A builder for ConversationItemRetrieved. ConversationItemRetrieved Returned when a conversation item is retrieved with conversation.item.retrieve
.Builder A builder for OutputAudioBufferStarted. OutputAudioBufferStarted WebRTC Only: Emitted when the server begins streaming audio to the client. Builder A builder for OutputAudioBufferStopped. OutputAudioBufferStopped WebRTC Only: Emitted when the output audio buffer has been completely drained on the server, and no more audio is forthcoming. Builder A builder for OutputAudioBufferCleared. OutputAudioBufferCleared WebRTC Only: Emitted when the output audio buffer is cleared. RealtimeServerEvent A realtime server event. Builder A builder for ResponseAudioDeltaEvent. ResponseAudioDeltaEvent Returned when the model-generated audio is updated. Builder A builder for ResponseAudioDoneEvent. ResponseAudioDoneEvent Returned when the model-generated audio is done. Builder A builder for ResponseAudioTranscriptDeltaEvent. ResponseAudioTranscriptDeltaEvent Returned when the model-generated transcription of audio output is updated. Builder A builder for ResponseAudioTranscriptDoneEvent. ResponseAudioTranscriptDoneEvent Returned when the model-generated transcription of audio output is done streaming. Builder A builder for ResponseCancelEvent. ResponseCancelEvent Send this event to cancel an in-progress response. Builder A builder for ResponseContentPartAddedEvent. Builder A builder for Part. Type The content type ("text", "audio"). Part The content part that was added. ResponseContentPartAddedEvent Returned when a new content part is added to an assistant message item during response generation. Builder A builder for ResponseContentPartDoneEvent. Builder A builder for Part. Type The content type ("text", "audio"). Part The content part that is done. ResponseContentPartDoneEvent Returned when a content part is done streaming in an assistant message item. Builder A builder for ResponseCreateEvent. Builder A builder for Response. Conversation Controls which conversation the response is added to. MaxResponseOutputTokens Maximum number of output tokens for a single assistant response, inclusive of tool calls. Builder A builder for Metadata. Metadata Set of 16 key-value pairs that can be attached to an object. Modality OutputAudioFormat The format of output audio. Builder A builder for Tool. Type The type of the tool, i.e. Tool Voice The voice the model uses to respond. Response Create a new Realtime response with these parameters ResponseCreateEvent This event instructs the server to create a Response, which means triggering model inference. Builder A builder for ResponseCreatedEvent. ResponseCreatedEvent Returned when a new Response is created. Builder A builder for ResponseDoneEvent. ResponseDoneEvent Returned when a Response is done streaming. Builder A builder for ResponseFunctionCallArgumentsDeltaEvent. ResponseFunctionCallArgumentsDeltaEvent Returned when the model-generated function call arguments are updated. Builder A builder for ResponseFunctionCallArgumentsDoneEvent. ResponseFunctionCallArgumentsDoneEvent Returned when the model-generated function call arguments are done streaming. Builder A builder for ResponseOutputItemAddedEvent. ResponseOutputItemAddedEvent Returned when a new Item is created during Response generation. Builder A builder for ResponseOutputItemDoneEvent. ResponseOutputItemDoneEvent Returned when an Item is done streaming. Builder A builder for ResponseTextDeltaEvent. ResponseTextDeltaEvent Returned when the text value of a "text" content part is updated. Builder A builder for ResponseTextDoneEvent. ResponseTextDoneEvent Returned when the text value of a "text" content part is done streaming. Builder A builder for SessionCreatedEvent. SessionCreatedEvent Returned when a Session is created. Builder A builder for SessionUpdateEvent. Builder A builder for Session. Builder A builder for ClientSecret. Builder A builder for ExpiresAfter. Anchor The anchor point for the ephemeral token expiration. ExpiresAfter Configuration for the ephemeral token expiration. ClientSecret Configuration options for the generated client secret. InputAudioFormat The format of input audio. Builder A builder for InputAudioNoiseReduction. Type Type of noise reduction. InputAudioNoiseReduction Configuration for input audio noise reduction. Builder A builder for InputAudioTranscription. InputAudioTranscription Configuration for input audio transcription, defaults to off and can be set to null
to turn off once on.MaxResponseOutputTokens Maximum number of output tokens for a single assistant response, inclusive of tool calls. Modality Model The Realtime model used for this session. OutputAudioFormat The format of output audio. Builder A builder for Tool. Type The type of the tool, i.e. Tool Builder A builder for TracingConfiguration. TracingConfiguration Granular configuration for tracing. Tracing Configuration options for tracing. Builder A builder for TurnDetection. Eagerness Used only for semantic_vad
mode.Type Type of turn detection. TurnDetection Configuration for turn detection, ether Server VAD or Semantic VAD. Voice The voice the model uses to respond. Session Realtime session object configuration. SessionUpdateEvent Send this event to update the session’s default configuration. Builder A builder for SessionUpdatedEvent. SessionUpdatedEvent Returned when a session is updated with a session.update
event, unless there is an error.Builder A builder for TranscriptionSessionUpdate. Builder A builder for Session. Builder A builder for ClientSecret. Builder A builder for ExpiresAt. Anchor The anchor point for the ephemeral token expiration. ExpiresAt Configuration for the ephemeral token expiration. ClientSecret Configuration options for the generated client secret. InputAudioFormat The format of input audio. Builder A builder for InputAudioNoiseReduction. Type Type of noise reduction. InputAudioNoiseReduction Configuration for input audio noise reduction. Builder A builder for InputAudioTranscription. Model The model to use for transcription, current options are gpt-4o-transcribe
,gpt-4o-mini-transcribe
, andwhisper-1
.InputAudioTranscription Configuration for input audio transcription. Modality Builder A builder for TurnDetection. Eagerness Used only for semantic_vad
mode.Type Type of turn detection. TurnDetection Configuration for turn detection, ether Server VAD or Semantic VAD. Session Realtime transcription session object configuration. TranscriptionSessionUpdate Send this event to update a transcription session. Builder A builder for TranscriptionSessionUpdatedEvent. TranscriptionSessionUpdatedEvent Returned when a transcription session is updated with a transcription_session.update
event, unless there is an error. -
Enum Summary Enum Description Known An enum containing Object's known values. Value An enum containing Object's known values, as well as an _UNKNOWN member. Known An enum containing Object's known values. Value An enum containing Object's known values, as well as an _UNKNOWN member. Known An enum containing Role's known values. Value An enum containing Role's known values, as well as an _UNKNOWN member. Known An enum containing Status's known values. Value An enum containing Status's known values, as well as an _UNKNOWN member. Known An enum containing Type's known values. Value An enum containing Type's known values, as well as an _UNKNOWN member. Known An enum containing Type's known values. Value An enum containing Type's known values, as well as an _UNKNOWN member. Known An enum containing Type's known values. Value An enum containing Type's known values, as well as an _UNKNOWN member. Known An enum containing Object's known values. Value An enum containing Object's known values, as well as an _UNKNOWN member. Known An enum containing Role's known values. Value An enum containing Role's known values, as well as an _UNKNOWN member. Known An enum containing Status's known values. Value An enum containing Status's known values, as well as an _UNKNOWN member. Known An enum containing Type's known values. Value An enum containing Type's known values, as well as an _UNKNOWN member. Known An enum containing Name's known values. Value An enum containing Name's known values, as well as an _UNKNOWN member. Known An enum containing Modality's known values. Value An enum containing Modality's known values, as well as an _UNKNOWN member. Known An enum containing Object's known values. Value An enum containing Object's known values, as well as an _UNKNOWN member. Known An enum containing OutputAudioFormat's known values. Value An enum containing OutputAudioFormat's known values, as well as an _UNKNOWN member. Known An enum containing Status's known values. Value An enum containing Status's known values, as well as an _UNKNOWN member. Known An enum containing Voice's known values. Value An enum containing Voice's known values, as well as an _UNKNOWN member. Known An enum containing Reason's known values. Value An enum containing Reason's known values, as well as an _UNKNOWN member. Known An enum containing Type's known values. Value An enum containing Type's known values, as well as an _UNKNOWN member. Known An enum containing Type's known values. Value An enum containing Type's known values, as well as an _UNKNOWN member. Known An enum containing Type's known values. Value An enum containing Type's known values, as well as an _UNKNOWN member. Known An enum containing Conversation's known values. Value An enum containing Conversation's known values, as well as an _UNKNOWN member. Known An enum containing Modality's known values. Value An enum containing Modality's known values, as well as an _UNKNOWN member. Known An enum containing OutputAudioFormat's known values. Value An enum containing OutputAudioFormat's known values, as well as an _UNKNOWN member. Known An enum containing Type's known values. Value An enum containing Type's known values, as well as an _UNKNOWN member. Known An enum containing Voice's known values. Value An enum containing Voice's known values, as well as an _UNKNOWN member. Known An enum containing Anchor's known values. Value An enum containing Anchor's known values, as well as an _UNKNOWN member. Known An enum containing InputAudioFormat's known values. Value An enum containing InputAudioFormat's known values, as well as an _UNKNOWN member. Known An enum containing Type's known values. Value An enum containing Type's known values, as well as an _UNKNOWN member. Known An enum containing Modality's known values. Value An enum containing Modality's known values, as well as an _UNKNOWN member. Known An enum containing Model's known values. Value An enum containing Model's known values, as well as an _UNKNOWN member. Known An enum containing OutputAudioFormat's known values. Value An enum containing OutputAudioFormat's known values, as well as an _UNKNOWN member. Known An enum containing Type's known values. Value An enum containing Type's known values, as well as an _UNKNOWN member. Known An enum containing Eagerness's known values. Value An enum containing Eagerness's known values, as well as an _UNKNOWN member. Known An enum containing Type's known values. Value An enum containing Type's known values, as well as an _UNKNOWN member. Known An enum containing Voice's known values. Value An enum containing Voice's known values, as well as an _UNKNOWN member. Known An enum containing Anchor's known values. Value An enum containing Anchor's known values, as well as an _UNKNOWN member. Known An enum containing InputAudioFormat's known values. Value An enum containing InputAudioFormat's known values, as well as an _UNKNOWN member. Known An enum containing Type's known values. Value An enum containing Type's known values, as well as an _UNKNOWN member. Known An enum containing Model's known values. Value An enum containing Model's known values, as well as an _UNKNOWN member. Known An enum containing Modality's known values. Value An enum containing Modality's known values, as well as an _UNKNOWN member. Known An enum containing Eagerness's known values. Value An enum containing Eagerness's known values, as well as an _UNKNOWN member. Known An enum containing Type's known values. Value An enum containing Type's known values, as well as an _UNKNOWN member. -
Interface Summary Interface Description Visitor An interface that defines how to map each variant of Usage to a value of type T. Visitor An interface that defines how to map each variant of RealtimeClientEvent to a value of type T. Visitor An interface that defines how to map each variant of MaxOutputTokens to a value of type T. Visitor An interface that defines how to map each variant of RealtimeServerEvent to a value of type T. Visitor An interface that defines how to map each variant of MaxResponseOutputTokens to a value of type T. Visitor An interface that defines how to map each variant of MaxResponseOutputTokens to a value of type T. Visitor An interface that defines how to map each variant of Tracing to a value of type T.