class

OpenAI::RealtimeResponse

Inherits JSON::Serializable < Reference < Object

The response resource.

Constructors

new(id : String | Nil = nil, object : Hash(String, JSON::Any) | Nil = nil, status : RealtimeResponseStatus | Nil = nil, status_details : RealtimeResponseStatusDetails | Nil = nil, output : Array(RealtimeConversationItem) | Nil = nil, metadata : Metadata | Nil = nil, audio : RealtimeResponseAudio | Nil = nil, usage : RealtimeResponseUsage | Nil = nil, conversation_id : String | Nil = nil, output_modalities : Array(RealtimeResponseOutputModalitiesItem) | Nil = nil, max_output_tokens : RealtimeResponseMaxOutputTokens | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

audio

Configuration for audio output.

Source
audio=(audio : RealtimeResponseAudio | Nil)

Configuration for audio output.

Source
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 automatically by VAD the response will be added to the default conversation

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 automatically by VAD the response will be added to the default conversation

Source
id

The unique ID of the response, will look like resp_1234.

Source
id=(id : String | Nil)

The unique ID of the response, will look like resp_1234.

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 : RealtimeResponseMaxOutputTokens | 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
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_modalities

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 mode text will disable audio output from the model.

Source
output_modalities=(output_modalities : Array(RealtimeResponseOutputModalitiesItem) | Nil)

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 mode text will disable audio output from the model.

Source
status

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

Source
status=(status : RealtimeResponseStatus | 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 : RealtimeResponseStatusDetails | Nil)

Additional details about the status.

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 : RealtimeResponseUsage | 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