Class: OpenAI::Models::Image
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Image
- Defined in:
- lib/openai/models/image.rb,
sig/openai/models/image.rbs
Instance Attribute Summary collapse
-
#b64_json ⇒ String?
The base64-encoded JSON of the generated image.
-
#revised_prompt ⇒ String?
The revised prompt used to generate the image, for models that support prompt revision.
-
#url ⇒ String?
The URL of the generated image when
response_formatis set tourlfor models that support that parameter.
Attributes inherited from Internal::Type::BaseModel
Instance Method Summary collapse
-
#initialize(b64_json: nil, revised_prompt: nil, url: nil) ⇒ Image
constructor
A new instance of Image.
- #to_hash ⇒ { ?:b64_json => String, ?revised_prompt: String, ?url: String }
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(b64_json: nil, revised_prompt: nil, url: nil) ⇒ Image
Returns a new instance of Image.
|
|
# File 'lib/openai/models/image.rb', line 28
|
Instance Attribute Details
#b64_json ⇒ String?
The base64-encoded JSON of the generated image. Returned by default for GPT
image models, or when response_format is set to b64_json for models that
support that parameter.
12 |
# File 'lib/openai/models/image.rb', line 12 optional :b64_json, String |
#revised_prompt ⇒ String?
The revised prompt used to generate the image, for models that support prompt revision. Not returned by GPT image models.
19 |
# File 'lib/openai/models/image.rb', line 19 optional :revised_prompt, String |
#url ⇒ String?
The URL of the generated image when response_format is set to url for models
that support that parameter. Unsupported for GPT image models.
26 |
# File 'lib/openai/models/image.rb', line 26 optional :url, String |
Instance Method Details
#to_hash ⇒ { ?:b64_json => String, ?revised_prompt: String, ?url: String }
48 49 50 51 52 |
# File 'sig/openai/models/image.rbs', line 48
def to_hash: -> {
?:b64_json => String,
?revised_prompt: String,
?url: String
}
|