class

OpenAI::RealtimeBetaResponse

Inherits JSON::Serializable < Reference < Object

The response resource.

Constructors

new(id : String | Nil = nil, object : Hash(String, JSON::Any) | Nil = nil, status : RealtimeBetaResponseStatus | Nil = nil, status_details : RealtimeBetaResponseStatusDetails | Nil = nil, output : Array(RealtimeConversationItem) | Nil = nil, metadata : Metadata | Nil = nil, usage : RealtimeBetaResponseUsage | Nil = nil, conversation_id : String | Nil = nil, voice : VoiceIdsShared | Nil = nil, modalities : Array(RealtimeBetaResponseModalitiesItem) | Nil = nil, output_audio_format : RealtimeBetaResponseOutputAudioFormat | Nil = nil, temperature : Float64 | Nil = nil, max_output_tokens : RealtimeBetaResponseMaxOutputTokens | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

conversation_id

Which conversation the response is added to, determined by the conversation field in the response.create event. If auto, the response will be added to the default conversation and the value of conversation_id will be an id like conv_1234. If none, the response will not be added to any conversation and the value of conversation_id will be null. If responses are being triggered by server VAD, the response will be added to the default conversation, thus the conversation_id will be an id like conv_1234.

Source
conversation_id=(conversation_id : String | Nil)

Which conversation the response is added to, determined by the conversation field in the response.create event. If auto, the response will be added to the default conversation and the value of conversation_id will be an id like conv_1234. If none, the response will not be added to any conversation and the value of conversation_id will be null. If responses are being triggered by server VAD, the response will be added to the default conversation, thus the conversation_id will be an id like conv_1234.

Source
id

The unique ID of the response.

Source
id=(id : String | Nil)

The unique ID of the response.

Source
max_output_tokens

Maximum number of output tokens for a single assistant response, inclusive of tool calls, that was used in this response.

Source
max_output_tokens=(max_output_tokens : RealtimeBetaResponseMaxOutputTokens | Nil)

Maximum number of output tokens for a single assistant response, inclusive of tool calls, that was used in this response.

Source
metadata
Source
metadata=(metadata : Metadata | Nil)
Source
modalities

The set of modalities the model used to respond. If there are multiple modalities, the model will pick one, for example if modalities is ["text", "audio"], the model could be responding in either text or audio.

Source
modalities=(modalities : Array(RealtimeBetaResponseModalitiesItem) | Nil)

The set of modalities the model used to respond. If there are multiple modalities, the model will pick one, for example if modalities is ["text", "audio"], the model could be responding in either text or audio.

Source
object

The object type, must be realtime.response.

Source
object=(object : Hash(String, JSON::Any) | Nil)

The object type, must be realtime.response.

Source
output

The list of output items generated by the response.

Source
output=(output : Array(RealtimeConversationItem) | Nil)

The list of output items generated by the response.

Source
output_audio_format

The format of output audio. Options are pcm16, g711_ulaw, or g711_alaw.

Source
output_audio_format=(output_audio_format : RealtimeBetaResponseOutputAudioFormat | Nil)

The format of output audio. Options are pcm16, g711_ulaw, or g711_alaw.

Source
status

The final status of the response (completed, cancelled, failed, or incomplete, in_progress).

Source
status=(status : RealtimeBetaResponseStatus | Nil)

The final status of the response (completed, cancelled, failed, or incomplete, in_progress).

Source
status_details

Additional details about the status.

Source
status_details=(status_details : RealtimeBetaResponseStatusDetails | Nil)

Additional details about the status.

Source
temperature

Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8.

Source
temperature=(temperature : Float64 | Nil)

Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8.

Source
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.

Source
usage=(usage : RealtimeBetaResponseUsage | Nil)

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.

Source
voice

The voice the model used to respond. Current voice options are alloy, ash, ballad, coral, echo, sage, shimmer, and verse.

Source
voice=(voice : VoiceIdsShared | Nil)

The voice the model used to respond. Current voice options are alloy, ash, ballad, coral, echo, sage, shimmer, and verse.

Source