Class: OpenAI::Models::CompletionUsage::PromptTokensDetails

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/completion_usage.rb

Overview

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, 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, cached_tokens: nil) ⇒ Object

Breakdown of tokens used in the prompt.

Parameters:

  • audio_tokens (Integer) (defaults to: nil)

    Audio input tokens present in the prompt.

  • cached_tokens (Integer) (defaults to: nil)

    Cached tokens present in the prompt.



# File 'lib/openai/models/completion_usage.rb', line 108

Instance Attribute Details

#audio_tokensInteger?

Audio input tokens present in the prompt.

Returns:

  • (Integer, nil)


100
# File 'lib/openai/models/completion_usage.rb', line 100

optional :audio_tokens, Integer

#cached_tokensInteger?

Cached tokens present in the prompt.

Returns:

  • (Integer, nil)


106
# File 'lib/openai/models/completion_usage.rb', line 106

optional :cached_tokens, Integer