Class: OpenAI::Models::Audio::TranscriptionDiarized::Usage::Tokens

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

Defined Under Namespace

Classes: InputTokenDetails

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

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_tokens:, output_tokens:, total_tokens:, input_token_details: nil, type: :tokens) ⇒ Object

Parameters:

  • input_tokens

    Number of input tokens billed for this request.

  • output_tokens

    Number of output tokens generated.

  • total_tokens

    Total number of tokens used (input + output).

  • input_token_details (defaults to: nil)

    Details about the input tokens billed for this request.

  • type (defaults to: :tokens)

    The type of the usage object. Always tokens for this variant.



# File 'lib/openai/models/audio/transcription_diarized.rb', line 104

Instance Attribute Details

#input_token_detailsOpenAI::Audio::TranscriptionDiarized::Usage::Tokens::InputTokenDetails?

Details about the input tokens billed for this request.

Returns:

  • (OpenAI::Audio::TranscriptionDiarized::Usage::Tokens::InputTokenDetails, nil)


99
100
101
102
# File 'lib/openai/models/audio/transcription_diarized.rb', line 99

optional(
  :input_token_details,
  -> { OpenAI::Audio::TranscriptionDiarized::Usage::Tokens::InputTokenDetails }
)

#input_tokensInteger

Number of input tokens billed for this request.

Returns:

  • (Integer)


75
# File 'lib/openai/models/audio/transcription_diarized.rb', line 75

required :input_tokens, Integer

#output_tokensInteger

Number of output tokens generated.

Returns:

  • (Integer)


81
# File 'lib/openai/models/audio/transcription_diarized.rb', line 81

required :output_tokens, Integer

#total_tokensInteger

Total number of tokens used (input + output).

Returns:

  • (Integer)


87
# File 'lib/openai/models/audio/transcription_diarized.rb', line 87

required :total_tokens, Integer

#type:tokens

The type of the usage object. Always tokens for this variant.

Returns:

  • (:tokens)


93
# File 'lib/openai/models/audio/transcription_diarized.rb', line 93

required :type, const: :tokens

Instance Method Details

#to_hash{

Returns:

  • ({)


115
# File 'sig/openai/models/audio/transcription_diarized.rbs', line 115

def to_hash: -> {