Class RealtimeResponse
-
- All Implemented Interfaces:
public final class RealtimeResponseThe response resource.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classRealtimeResponse.BuilderA builder for RealtimeResponse.
public final classRealtimeResponse.AudioConfiguration for audio output.
public final classRealtimeResponse.MaxOutputTokensMaximum number of output tokens for a single assistant response, inclusive of tool calls, that was used in this response.
public final classRealtimeResponse.MetadataSet of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.
Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
public final classRealtimeResponse.ObjectThe object type, must be
realtime.response.public final classRealtimeResponse.OutputModalitypublic final classRealtimeResponse.StatusThe final status of the response (
completed,cancelled,failed, orincomplete,in_progress).
-
Method Summary
Modifier and Type Method Description final Optional<String>id()The unique ID of the response, will look like resp_1234.final Optional<RealtimeResponse.Audio>audio()Configuration for audio output. final Optional<String>conversationId()Which conversation the response is added to, determined by the conversationfield in theresponse.createevent.final Optional<RealtimeResponse.MaxOutputTokens>maxOutputTokens()Maximum number of output tokens for a single assistant response, inclusive of tool calls, that was used in this response. final Optional<RealtimeResponse.Metadata>metadata()Set of 16 key-value pairs that can be attached to an object. final Optional<RealtimeResponse.Object>object_()The object type, must be realtime.response.final Optional<List<ConversationItem>>output()The list of output items generated by the response. final Optional<List<RealtimeResponse.OutputModality>>outputModalities()The set of modalities the model used to respond, currently the only possible values are [\"audio\"],[\"text\"].final Optional<RealtimeResponse.Status>status()The final status of the response ( completed,cancelled,failed, orincomplete,in_progress).final Optional<RealtimeResponseStatus>statusDetails()Additional details about the status. final Optional<RealtimeResponseUsage>usage()Usage statistics for the Response, this will correspond to billing. final JsonField<String>_id()Returns the raw JSON value of id. final JsonField<RealtimeResponse.Audio>_audio()Returns the raw JSON value of audio. final JsonField<String>_conversationId()Returns the raw JSON value of conversationId. final JsonField<RealtimeResponse.MaxOutputTokens>_maxOutputTokens()Returns the raw JSON value of maxOutputTokens. final JsonField<RealtimeResponse.Metadata>_metadata()Returns the raw JSON value of metadata. final JsonField<RealtimeResponse.Object>_object_()Returns the raw JSON value of object_. final JsonField<List<ConversationItem>>_output()Returns the raw JSON value of output. final JsonField<List<RealtimeResponse.OutputModality>>_outputModalities()Returns the raw JSON value of outputModalities. final JsonField<RealtimeResponse.Status>_status()Returns the raw JSON value of status. final JsonField<RealtimeResponseStatus>_statusDetails()Returns the raw JSON value of statusDetails. final JsonField<RealtimeResponseUsage>_usage()Returns the raw JSON value of usage. final Map<String, JsonValue>_additionalProperties()final RealtimeResponse.BuildertoBuilder()final RealtimeResponsevalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static RealtimeResponse.Builderbuilder()Returns a mutable builder for constructing an instance of RealtimeResponse. -
-
Method Detail
-
audio
final Optional<RealtimeResponse.Audio> audio()
Configuration for audio output.
-
conversationId
final Optional<String> conversationId()
Which conversation the response is added to, determined by the
conversationfield in theresponse.createevent. Ifauto, the response will be added to the default conversation and the value ofconversation_idwill be an id likeconv_1234. Ifnone, the response will not be added to any conversation and the value ofconversation_idwill benull. If responses are being triggered automatically by VAD the response will be added to the default conversation
-
maxOutputTokens
final Optional<RealtimeResponse.MaxOutputTokens> maxOutputTokens()
Maximum number of output tokens for a single assistant response, inclusive of tool calls, that was used in this response.
-
metadata
final Optional<RealtimeResponse.Metadata> metadata()
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.
Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
-
object_
final Optional<RealtimeResponse.Object> object_()
The object type, must be
realtime.response.
-
output
final Optional<List<ConversationItem>> output()
The list of output items generated by the response.
-
outputModalities
final Optional<List<RealtimeResponse.OutputModality>> outputModalities()
The set of modalities the model used to respond, currently the only possible values are
[\"audio\"],[\"text\"]. Audio output always include a text transcript. Setting the output to modetextwill disable audio output from the model.
-
status
final Optional<RealtimeResponse.Status> status()
The final status of the response (
completed,cancelled,failed, orincomplete,in_progress).
-
statusDetails
final Optional<RealtimeResponseStatus> statusDetails()
Additional details about the status.
-
usage
final Optional<RealtimeResponseUsage> usage()
Usage statistics for the Response, this will correspond to billing. A Realtime API session will maintain a conversation context and append new Items to the Conversation, thus output from previous turns (text and audio tokens) will become the input for later turns.
-
_id
final JsonField<String> _id()
Returns the raw JSON value of id.
Unlike id, this method doesn't throw if the JSON field has an unexpected type.
-
_audio
final JsonField<RealtimeResponse.Audio> _audio()
Returns the raw JSON value of audio.
Unlike audio, this method doesn't throw if the JSON field has an unexpected type.
-
_conversationId
final JsonField<String> _conversationId()
Returns the raw JSON value of conversationId.
Unlike conversationId, this method doesn't throw if the JSON field has an unexpected type.
-
_maxOutputTokens
final JsonField<RealtimeResponse.MaxOutputTokens> _maxOutputTokens()
Returns the raw JSON value of maxOutputTokens.
Unlike maxOutputTokens, this method doesn't throw if the JSON field has an unexpected type.
-
_metadata
final JsonField<RealtimeResponse.Metadata> _metadata()
Returns the raw JSON value of metadata.
Unlike metadata, this method doesn't throw if the JSON field has an unexpected type.
-
_object_
final JsonField<RealtimeResponse.Object> _object_()
Returns the raw JSON value of object_.
Unlike object_, this method doesn't throw if the JSON field has an unexpected type.
-
_output
final JsonField<List<ConversationItem>> _output()
Returns the raw JSON value of output.
Unlike output, this method doesn't throw if the JSON field has an unexpected type.
-
_outputModalities
final JsonField<List<RealtimeResponse.OutputModality>> _outputModalities()
Returns the raw JSON value of outputModalities.
Unlike outputModalities, this method doesn't throw if the JSON field has an unexpected type.
-
_status
final JsonField<RealtimeResponse.Status> _status()
Returns the raw JSON value of status.
Unlike status, this method doesn't throw if the JSON field has an unexpected type.
-
_statusDetails
final JsonField<RealtimeResponseStatus> _statusDetails()
Returns the raw JSON value of statusDetails.
Unlike statusDetails, this method doesn't throw if the JSON field has an unexpected type.
-
_usage
final JsonField<RealtimeResponseUsage> _usage()
Returns the raw JSON value of usage.
Unlike usage, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final RealtimeResponse.Builder toBuilder()
-
validate
final RealtimeResponse 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.
-
builder
final static RealtimeResponse.Builder builder()
Returns a mutable builder for constructing an instance of RealtimeResponse.
-
-
-
-