Class: OpenAI::Models::CompletionUsage::CompletionTokensDetails
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::CompletionUsage::CompletionTokensDetails
- Defined in:
- lib/openai/models/completion_usage.rb,
sig/openai/models/completion_usage.rbs
Overview
Instance Attribute Summary collapse
-
#accepted_prediction_tokens ⇒ Integer?
When using Predicted Outputs, the number of tokens in the prediction that appeared in the completion.
-
#audio_tokens ⇒ Integer?
Audio input tokens generated by the model.
-
#reasoning_tokens ⇒ Integer?
Tokens generated by the model for reasoning.
-
#rejected_prediction_tokens ⇒ Integer?
When using Predicted Outputs, the number of tokens in the prediction that did not appear in the completion.
Instance Method Summary collapse
- #initialize ⇒ Object constructor
- #to_hash ⇒ {
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 ⇒ Object
72 |
# File 'sig/openai/models/completion_usage.rbs', line 72
def initialize: (
|
Instance Attribute Details
#accepted_prediction_tokens ⇒ Integer?
When using Predicted Outputs, the number of tokens in the prediction that appeared in the completion.
56 |
# File 'lib/openai/models/completion_usage.rb', line 56 optional :accepted_prediction_tokens, Integer |
#audio_tokens ⇒ Integer?
Audio input tokens generated by the model.
62 |
# File 'lib/openai/models/completion_usage.rb', line 62 optional :audio_tokens, Integer |
#reasoning_tokens ⇒ Integer?
Tokens generated by the model for reasoning.
68 |
# File 'lib/openai/models/completion_usage.rb', line 68 optional :reasoning_tokens, Integer |
#rejected_prediction_tokens ⇒ Integer?
When using Predicted Outputs, the number of tokens in the prediction that did not appear in the completion. However, like reasoning tokens, these tokens are still counted in the total completion tokens for purposes of billing, output, and context window limits.
77 |
# File 'lib/openai/models/completion_usage.rb', line 77 optional :rejected_prediction_tokens, Integer |
Instance Method Details
#to_hash ⇒ {
79 |
# File 'sig/openai/models/completion_usage.rbs', line 79
def to_hash: -> {
|