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 ⇒ Pathname, ...
The image to use as the basis for the variation(s).
-
#model ⇒ String, ...
The model to use for image generation.
-
#n ⇒ Integer?
The number of images to generate.
-
#response_format ⇒ Symbol, ...
The format in which the generated images are returned.
-
#size ⇒ Symbol, ...
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: {}) ⇒ Object
constructor
Some parameter documentations has been truncated, see ImageCreateVariationParams for more details.
- #to_hash ⇒ {
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, #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:, model: nil, n: nil, response_format: nil, size: nil, user: nil, request_options: {}) ⇒ Object
Some parameter documentations has been truncated, see OpenAI::Models::ImageCreateVariationParams for more details.
|
|
# File 'lib/openai/models/image_create_variation_params.rb', line 57
|
Instance Attribute Details
#image ⇒ Pathname, ...
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 ⇒ String, ...
The model to use for image generation. Only dall-e-2 is supported at this
time.
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 ⇒ Symbol, ...
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 ⇒ Symbol, ...
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 98
|
.variants ⇒ Array(String, Symbol, OpenAI::Models::ImageModel)
|
|
# File 'lib/openai/models/image_create_variation_params.rb', line 85
|
Instance Method Details
#to_hash ⇒ {
42 |
# File 'sig/openai/models/image_create_variation_params.rbs', line 42
def to_hash: -> {
|