Class: OpenAI::Models::ImagesResponse::Usage::OutputTokensDetails

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

Overview

See Also:

  • OpenAI::Models::ImagesResponse::Usage#output_tokens_details

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(image_tokens:, text_tokens:) ⇒ OutputTokensDetails

Returns a new instance of OutputTokensDetails.

Parameters:

  • image_tokens —

    The number of image output tokens generated by the model.

  • text_tokens —

    The number of text output tokens generated by the model.

  • image_tokens: (Integer)
  • text_tokens: (Integer)


# File 'lib/openai/models/images_response.rb', line 246

Instance Attribute Details

#image_tokens ⇒ Integer

The number of image output tokens generated by the model.

Returns:

  • (Integer)


238
# File 'lib/openai/models/images_response.rb', line 238

required :image_tokens, Integer

#text_tokens ⇒ Integer

The number of text output tokens generated by the model.

Returns:

  • (Integer)


244
# File 'lib/openai/models/images_response.rb', line 244

required :text_tokens, Integer

Instance Method Details

#to_hash ⇒ { image_tokens: Integer, text_tokens: Integer }

Returns:

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


248
# File 'sig/openai/models/images_response.rbs', line 248

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