Class: OpenAI::Models::Realtime::RealtimeResponseUsageOutputTokenDetails

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/realtime/realtime_response_usage_output_token_details.rb,
sig/openai/models/realtime/realtime_response_usage_output_token_details.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, 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, #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(audio_tokens: nil, text_tokens: nil) ⇒ RealtimeResponseUsageOutputTokenDetails

Details about the output tokens used in the Response.

Parameters:

  • audio_tokens (Integer) (defaults to: nil)

    The number of audio tokens used in the Response.

  • text_tokens (Integer) (defaults to: nil)

    The number of text tokens used in the Response.

  • audio_tokens: (Integer) (defaults to: nil)
  • text_tokens: (Integer) (defaults to: nil)


# File 'lib/openai/models/realtime/realtime_response_usage_output_token_details.rb', line 19

Instance Attribute Details

#audio_tokensInteger?

The number of audio tokens used in the Response.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


11
# File 'lib/openai/models/realtime/realtime_response_usage_output_token_details.rb', line 11

optional :audio_tokens, Integer

#text_tokensInteger?

The number of text tokens used in the Response.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


17
# File 'lib/openai/models/realtime/realtime_response_usage_output_token_details.rb', line 17

optional :text_tokens, Integer

Instance Method Details

#to_hash{ audio_tokens: Integer, text_tokens: Integer }

Returns:

  • ({ audio_tokens: Integer, text_tokens: Integer })


18
# File 'sig/openai/models/realtime/realtime_response_usage_output_token_details.rbs', line 18

def to_hash: -> { audio_tokens: Integer, text_tokens: Integer }