Class: OpenAI::Models::Responses::ResponseOutputItem::ImageGenerationCall

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

Defined Under Namespace

Modules: Action, Background, OutputFormat, Quality, Size, Status

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Class Method Summary collapse

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(id:, result:, status:, action: nil, background: nil, output_format: nil, quality: nil, revised_prompt: nil, size: nil, type: :image_generation_call) ⇒ Object

Parameters:

  • id

    The unique ID of the image generation call.

  • result

    The generated image encoded in base64.

  • status

    The status of the image generation call.

  • action (defaults to: nil)

    The action used for image generation.

  • background (defaults to: nil)

    The background setting used for generation.

  • output_format (defaults to: nil)

    The output format used for generation.

  • quality (defaults to: nil)

    The quality of the image generated by the image generation tool call. One of low, medium, high, xhigh, max, or auto.

  • revised_prompt (defaults to: nil)

    The prompt that was used after any model prompt rewriting.

  • size (defaults to: nil)

    The image dimensions as a WIDTHxHEIGHT string, for example 1536x864.

  • type (defaults to: :image_generation_call)

    The type of the image generation call. Always image_generation_call.



# File 'lib/openai/models/responses/response_output_item.rb', line 347

Instance Attribute Details

#actionOpenAI::Models::Responses::ResponseOutputItem::ImageGenerationCall::action?

The action used for image generation.

Returns:

  • (OpenAI::Models::Responses::ResponseOutputItem::ImageGenerationCall::action, nil)


292
293
294
295
296
# File 'lib/openai/models/responses/response_output_item.rb', line 292

optional(
  :action,
  enum: -> { OpenAI::Responses::ResponseOutputItem::ImageGenerationCall::Action },
  nil?: true
)

#backgroundOpenAI::Models::Responses::ResponseOutputItem::ImageGenerationCall::background?

The background setting used for generation.

Returns:

  • (OpenAI::Models::Responses::ResponseOutputItem::ImageGenerationCall::background, nil)


302
303
304
305
306
# File 'lib/openai/models/responses/response_output_item.rb', line 302

optional(
  :background,
  enum: -> { OpenAI::Responses::ResponseOutputItem::ImageGenerationCall::Background },
  nil?: true
)

#idString

The unique ID of the image generation call.

Returns:

  • (String)


268
# File 'lib/openai/models/responses/response_output_item.rb', line 268

required :id, String

#output_formatOpenAI::Models::Responses::ResponseOutputItem::ImageGenerationCall::output_format?

The output format used for generation.

Returns:

  • (OpenAI::Models::Responses::ResponseOutputItem::ImageGenerationCall::output_format, nil)


312
313
314
315
316
# File 'lib/openai/models/responses/response_output_item.rb', line 312

optional(
  :output_format,
  enum: -> { OpenAI::Responses::ResponseOutputItem::ImageGenerationCall::OutputFormat },
  nil?: true
)

#qualityOpenAI::Models::Responses::ResponseOutputItem::ImageGenerationCall::quality?

The quality of the image generated by the image generation tool call. One of low, medium, high, xhigh, max, or auto.

Returns:

  • (OpenAI::Models::Responses::ResponseOutputItem::ImageGenerationCall::quality, nil)


323
324
325
326
327
# File 'lib/openai/models/responses/response_output_item.rb', line 323

optional(
  :quality,
  enum: -> { OpenAI::Responses::ResponseOutputItem::ImageGenerationCall::Quality },
  nil?: true
)

#resultString?

The generated image encoded in base64.

Returns:

  • (String, nil)


274
# File 'lib/openai/models/responses/response_output_item.rb', line 274

required :result, String, nil?: true

#revised_promptString?

The prompt that was used after any model prompt rewriting.

Returns:

  • (String, nil)


333
# File 'lib/openai/models/responses/response_output_item.rb', line 333

optional :revised_prompt, String, nil?: true

#sizeOpenAI::Models::Responses::ResponseOutputItem::ImageGenerationCall::size?

The image dimensions as a WIDTHxHEIGHT string, for example 1536x864.

Returns:

  • (OpenAI::Models::Responses::ResponseOutputItem::ImageGenerationCall::size, nil)


339
340
341
342
343
344
345
# File 'lib/openai/models/responses/response_output_item.rb', line 339

optional(
  :size,
  union: -> {
    OpenAI::Responses::ResponseOutputItem::ImageGenerationCall::Size
  },
  nil?: true
)

#statusOpenAI::Models::Responses::ResponseOutputItem::ImageGenerationCall::status

The status of the image generation call.

Returns:

  • (OpenAI::Models::Responses::ResponseOutputItem::ImageGenerationCall::status)


280
# File 'lib/openai/models/responses/response_output_item.rb', line 280

required :status, enum: -> { OpenAI::Responses::ResponseOutputItem::ImageGenerationCall::Status }

#type:image_generation_call

The type of the image generation call. Always image_generation_call.

Returns:

  • (:image_generation_call)


286
# File 'lib/openai/models/responses/response_output_item.rb', line 286

required :type, const: :image_generation_call

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/responses/response_output_item.rb', line 392

Instance Method Details

#to_hash{

Returns:

  • ({)


301
# File 'sig/openai/models/responses/response_output_item.rbs', line 301

def to_hash: -> {