Class: OpenAI::Models::ImageCreateVariationParams
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::ImageCreateVariationParams
- Extended by:
- Internal::Type::RequestParameters::Converter
- Includes:
- Internal::Type::RequestParameters
- Defined in:
- lib/openai/models/image_create_variation_params.rb,
sig/openai/models/image_create_variation_params.rbs
Overview
Defined Under Namespace
Modules: Model, ResponseFormat, Size
Instance Attribute Summary collapse
-
#image ⇒ OpenAI::Internal::file_input
The image to use as the basis for the variation(s).
-
#model ⇒ OpenAI::Models::ImageCreateVariationParams::model?
The legacy model used by the retired image variations endpoint.
-
#n ⇒ Integer?
The number of images to generate.
-
#response_format ⇒ OpenAI::Models::ImageCreateVariationParams::response_format?
The format in which the generated images are returned.
-
#size ⇒ OpenAI::Models::ImageCreateVariationParams::size?
The size of the generated images.
-
#user ⇒ String?
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.
Attributes included from Internal::Type::RequestParameters
Attributes inherited from Internal::Type::BaseModel
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(image:, model: nil, n: nil, response_format: nil, size: nil, user: nil, request_options: {}) ⇒ ImageCreateVariationParams
constructor
A new instance of ImageCreateVariationParams.
- #to_hash ⇒ { image: OpenAI::Internal::file_input, ?model: OpenAI::Models::ImageCreateVariationParams::model?, ?n: Integer?, ?response_format: OpenAI::Models::ImageCreateVariationParams::response_format?, ?size: OpenAI::Models::ImageCreateVariationParams::size?, ?user: String, ?request_options: OpenAI::RequestOptions }
Methods included from Internal::Type::RequestParameters::Converter
Methods included from Internal::Type::RequestParameters
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_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, 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:, model: nil, n: nil, response_format: nil, size: nil, user: nil, request_options: {}) ⇒ ImageCreateVariationParams
Returns a new instance of ImageCreateVariationParams.
|
|
# File 'lib/openai/models/image_create_variation_params.rb', line 57
|
Instance Attribute Details
#image ⇒ OpenAI::Internal::file_input
The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.
String, StringIO, and pathless IO inputs are sent with generic upload
metadata. Use OpenAI::FilePart when you need to override the filename or
content type.
19 |
# File 'lib/openai/models/image_create_variation_params.rb', line 19 required :image, OpenAI::Internal::Type::FileInput |
#model ⇒ OpenAI::Models::ImageCreateVariationParams::model?
The legacy model used by the retired image variations endpoint. This endpoint no longer accepts requests.
26 |
# File 'lib/openai/models/image_create_variation_params.rb', line 26 optional :model, union: -> { OpenAI::ImageCreateVariationParams::Model }, nil?: true |
#n ⇒ Integer?
The number of images to generate. Must be between 1 and 10.
32 |
# File 'lib/openai/models/image_create_variation_params.rb', line 32 optional :n, Integer, nil?: true |
#response_format ⇒ OpenAI::Models::ImageCreateVariationParams::response_format?
The format in which the generated images are returned. Must be one of url or
b64_json. URLs are only valid for 60 minutes after the image has been
generated.
40 |
# File 'lib/openai/models/image_create_variation_params.rb', line 40 optional :response_format, enum: -> { OpenAI::ImageCreateVariationParams::ResponseFormat }, nil?: true |
#size ⇒ OpenAI::Models::ImageCreateVariationParams::size?
The size of the generated images. Must be one of 256x256, 512x512, or
1024x1024.
47 |
# File 'lib/openai/models/image_create_variation_params.rb', line 47 optional :size, enum: -> { OpenAI::ImageCreateVariationParams::Size }, nil?: true |
#user ⇒ String?
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.
55 |
# File 'lib/openai/models/image_create_variation_params.rb', line 55 optional :user, String |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/openai/models/image_create_variation_params.rb', line 112
|
.variants ⇒ Array(String, Symbol, OpenAI::Models::ImageModel)
|
|
# File 'lib/openai/models/image_create_variation_params.rb', line 99
|
Instance Method Details
#to_hash ⇒ { image: OpenAI::Internal::file_input, ?model: OpenAI::Models::ImageCreateVariationParams::model?, ?n: Integer?, ?response_format: OpenAI::Models::ImageCreateVariationParams::response_format?, ?size: OpenAI::Models::ImageCreateVariationParams::size?, ?user: String, ?request_options: OpenAI::RequestOptions }
85 86 87 88 89 90 91 92 93 |
# File 'sig/openai/models/image_create_variation_params.rbs', line 85
def to_hash: -> {
image: OpenAI::Internal::file_input,
?model: OpenAI::Models::ImageCreateVariationParams::model?,
?n: Integer?,
?response_format: OpenAI::Models::ImageCreateVariationParams::response_format?,
?size: OpenAI::Models::ImageCreateVariationParams::size?,
?user: String,
?request_options: OpenAI::RequestOptions
}
|