Class: OpenAI::Models::Realtime::RealtimeResponseUsage
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Realtime::RealtimeResponseUsage
- Defined in:
- lib/openai/models/realtime/realtime_response_usage.rb,
sig/openai/models/realtime/realtime_response_usage.rbs
Instance Attribute Summary collapse
-
#input_token_details ⇒ OpenAI::Realtime::RealtimeResponseUsageInputTokenDetails?
Details about the input tokens used in the Response.
-
#input_tokens ⇒ Integer?
The number of input tokens used in the Response, including text and audio tokens.
-
#output_token_details ⇒ OpenAI::Realtime::RealtimeResponseUsageOutputTokenDetails?
Details about the output tokens used in the Response.
-
#output_tokens ⇒ Integer?
The number of output tokens sent in the Response, including text and audio tokens.
-
#total_tokens ⇒ Integer?
The total number of tokens in the Response including input and output text and audio tokens.
Attributes inherited from Internal::Type::BaseModel
Instance Method Summary collapse
- #initialize(input_token_details: nil, input_tokens: nil, output_token_details: nil, output_tokens: nil, total_tokens: nil) ⇒ Object constructor
- #to_hash ⇒ {
Methods inherited from Internal::Type::BaseModel
==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, fields, hash, #hash, inherited, #inspect, inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, coerce_with_error, dump, #dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(input_token_details: nil, input_tokens: nil, output_token_details: nil, output_tokens: nil, total_tokens: nil) ⇒ Object
|
|
# File 'lib/openai/models/realtime/realtime_response_usage.rb', line 43
|
Instance Attribute Details
#input_token_details ⇒ OpenAI::Realtime::RealtimeResponseUsageInputTokenDetails?
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.
14 |
# File 'lib/openai/models/realtime/realtime_response_usage.rb', line 14 optional :input_token_details, -> { OpenAI::Realtime::RealtimeResponseUsageInputTokenDetails } |
#input_tokens ⇒ Integer?
The number of input tokens used in the Response, including text and audio tokens.
21 |
# File 'lib/openai/models/realtime/realtime_response_usage.rb', line 21 optional :input_tokens, Integer |
#output_token_details ⇒ OpenAI::Realtime::RealtimeResponseUsageOutputTokenDetails?
Details about the output tokens used in the Response.
27 |
# File 'lib/openai/models/realtime/realtime_response_usage.rb', line 27 optional :output_token_details, -> { OpenAI::Realtime::RealtimeResponseUsageOutputTokenDetails } |
#output_tokens ⇒ Integer?
The number of output tokens sent in the Response, including text and audio tokens.
34 |
# File 'lib/openai/models/realtime/realtime_response_usage.rb', line 34 optional :output_tokens, Integer |
#total_tokens ⇒ Integer?
The total number of tokens in the Response including input and output text and audio tokens.
41 |
# File 'lib/openai/models/realtime/realtime_response_usage.rb', line 41 optional :total_tokens, Integer |
Instance Method Details
#to_hash ⇒ {
84 |
# File 'sig/openai/models/realtime/realtime_response_usage.rbs', line 84
def to_hash: -> {
|