class

OpenAI::RealtimeBetaResponseUsage

Inherits JSON::Serializable < Reference < Object

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.

Constructors

new(total_tokens : Int64 | Nil = nil, input_tokens : Int64 | Nil = nil, output_tokens : Int64 | Nil = nil, input_token_details : RealtimeBetaResponseUsageInputTokenDetails | Nil = nil, output_token_details : RealtimeBetaResponseUsageOutputTokenDetails | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

input_token_details

Details about the input tokens used in the Response.

Source
input_token_details=(input_token_details : RealtimeBetaResponseUsageInputTokenDetails | Nil)

Details about the input tokens used in the Response.

Source
input_tokens

The number of input tokens used in the Response, including text and audio tokens.

Source
input_tokens=(input_tokens : Int64 | Nil)

The number of input tokens used in the Response, including text and audio tokens.

Source
output_token_details

Details about the output tokens used in the Response.

Source
output_token_details=(output_token_details : RealtimeBetaResponseUsageOutputTokenDetails | Nil)

Details about the output tokens used in the Response.

Source
output_tokens

The number of output tokens sent in the Response, including text and audio tokens.

Source
output_tokens=(output_tokens : Int64 | Nil)

The number of output tokens sent in the Response, including text and audio tokens.

Source
total_tokens

The total number of tokens in the Response including input and output text and audio tokens.

Source
total_tokens=(total_tokens : Int64 | Nil)

The total number of tokens in the Response including input and output text and audio tokens.

Source