Class: OpenAI::Models::ImagesResponse
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::ImagesResponse
- Defined in:
- lib/openai/models/images_response.rb,
sig/openai/models/images_response.rbs
Overview
Defined Under Namespace
Modules: Background, OutputFormat, Quality, Size Classes: Usage
Instance Attribute Summary collapse
-
#background ⇒ OpenAI::Models::ImagesResponse::background?
The background parameter used for the image generation.
-
#created ⇒ Integer
The Unix timestamp (in seconds) of when the image was created.
-
#data ⇒ ::Array[OpenAI::Image]?
The list of generated images.
-
#output_format ⇒ OpenAI::Models::ImagesResponse::output_format?
The output format of the image generation.
-
#quality ⇒ OpenAI::Models::ImagesResponse::quality?
The quality of the image generated.
-
#size ⇒ OpenAI::Models::ImagesResponse::size?
The image dimensions as a
WIDTHxHEIGHTstring, for example1536x864. -
#usage ⇒ OpenAI::ImagesResponse::Usage?
For
gpt-image-1only, the token usage information for the image generation.
Attributes inherited from Internal::Type::BaseModel
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(created:, background: nil, data: nil, output_format: nil, quality: nil, size: nil, usage: nil) ⇒ Object constructor
- #to_hash ⇒ {
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(created:, background: nil, data: nil, output_format: nil, quality: nil, size: nil, usage: nil) ⇒ Object
|
|
# File 'lib/openai/models/images_response.rb', line 51
|
Instance Attribute Details
#background ⇒ OpenAI::Models::ImagesResponse::background?
The background parameter used for the image generation. Either transparent or
opaque.
18 |
# File 'lib/openai/models/images_response.rb', line 18 optional :background, enum: -> { OpenAI::ImagesResponse::Background } |
#created ⇒ Integer
The Unix timestamp (in seconds) of when the image was created.
11 |
# File 'lib/openai/models/images_response.rb', line 11 required :created, Integer |
#data ⇒ ::Array[OpenAI::Image]?
The list of generated images.
24 |
# File 'lib/openai/models/images_response.rb', line 24 optional :data, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Image] } |
#output_format ⇒ OpenAI::Models::ImagesResponse::output_format?
The output format of the image generation. Either png, webp, or jpeg.
30 |
# File 'lib/openai/models/images_response.rb', line 30 optional :output_format, enum: -> { OpenAI::ImagesResponse::OutputFormat } |
#quality ⇒ OpenAI::Models::ImagesResponse::quality?
The quality of the image generated. One of low, medium, high, xhigh, or
max.
37 |
# File 'lib/openai/models/images_response.rb', line 37 optional :quality, enum: -> { OpenAI::ImagesResponse::Quality } |
#size ⇒ OpenAI::Models::ImagesResponse::size?
The image dimensions as a WIDTHxHEIGHT string, for example 1536x864.
43 |
# File 'lib/openai/models/images_response.rb', line 43 optional :size, union: -> { OpenAI::ImagesResponse::Size } |
#usage ⇒ OpenAI::ImagesResponse::Usage?
For gpt-image-1 only, the token usage information for the image generation.
49 |
# File 'lib/openai/models/images_response.rb', line 49 optional :usage, -> { OpenAI::ImagesResponse::Usage } |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/openai/models/images_response.rb', line 87
|
Instance Method Details
#to_hash ⇒ {
94 |
# File 'sig/openai/models/images_response.rbs', line 94 def to_hash: -> { |