class

OpenAI::RealtimeResponseUsageInputTokenDetails

Inherits JSON::Serializable < Reference < Object

Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.

Constructors

new(cached_tokens : Int64 | Nil = nil, text_tokens : Int64 | Nil = nil, image_tokens : Int64 | Nil = nil, audio_tokens : Int64 | Nil = nil, cached_tokens_details : RealtimeResponseUsageInputTokenDetailsCachedTokensDetails | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

audio_tokens

The number of audio tokens used as input for the Response.

Source
audio_tokens=(audio_tokens : Int64 | Nil)

The number of audio tokens used as input for the Response.

Source
cached_tokens

The number of cached tokens used as input for the Response.

Source
cached_tokens=(cached_tokens : Int64 | Nil)

The number of cached tokens used as input for the Response.

Source
cached_tokens_details

Details about the cached tokens used as input for the Response.

Source
cached_tokens_details=(cached_tokens_details : RealtimeResponseUsageInputTokenDetailsCachedTokensDetails | Nil)

Details about the cached tokens used as input for the Response.

Source
image_tokens

The number of image tokens used as input for the Response.

Source
image_tokens=(image_tokens : Int64 | Nil)

The number of image tokens used as input for the Response.

Source
text_tokens

The number of text tokens used as input for the Response.

Source
text_tokens=(text_tokens : Int64 | Nil)

The number of text tokens used as input for the Response.

Source