Class: OpenAI::Models::Beta::BetaResponseItem::ImageGenerationCall

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/beta/beta_response_item.rb

Defined Under Namespace

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

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(agent_name:) ⇒ Object

The agent that produced this item.

Parameters:

  • agent_name (String)

    The canonical name of the agent that produced this item.



# File 'lib/openai/models/beta/beta_response_item.rb', line 916

Instance Attribute Details

#actionSymbol, ...

The action used for image generation.



857
858
859
860
861
862
863
# File 'lib/openai/models/beta/beta_response_item.rb', line 857

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

#agentOpenAI::Models::Beta::BetaResponseItem::ImageGenerationCall::Agent?

The agent that produced this item.



869
# File 'lib/openai/models/beta/beta_response_item.rb', line 869

optional :agent, -> { OpenAI::Beta::BetaResponseItem::ImageGenerationCall::Agent }, nil?: true

#backgroundSymbol, ...

The background setting used for generation.



875
876
877
878
879
# File 'lib/openai/models/beta/beta_response_item.rb', line 875

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

#idString

The unique ID of the image generation call.

Returns:

  • (String)


833
# File 'lib/openai/models/beta/beta_response_item.rb', line 833

required :id, String

#output_formatSymbol, ...

The output format used for generation.



885
886
887
888
889
# File 'lib/openai/models/beta/beta_response_item.rb', line 885

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

#qualitySymbol, ...

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



896
897
898
899
900
901
902
# File 'lib/openai/models/beta/beta_response_item.rb', line 896

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

#resultString?

The generated image encoded in base64.

Returns:

  • (String, nil)


839
# File 'lib/openai/models/beta/beta_response_item.rb', line 839

required :result, String, nil?: true

#revised_promptString?

The prompt that was used after any model prompt rewriting.

Returns:

  • (String, nil)


908
# File 'lib/openai/models/beta/beta_response_item.rb', line 908

optional :revised_prompt, String, nil?: true

#sizeString, ...

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



914
# File 'lib/openai/models/beta/beta_response_item.rb', line 914

optional :size, union: -> { OpenAI::Beta::BetaResponseItem::ImageGenerationCall::Size }, nil?: true

#statusSymbol, OpenAI::Models::Beta::BetaResponseItem::ImageGenerationCall::Status

The status of the image generation call.



845
# File 'lib/openai/models/beta/beta_response_item.rb', line 845

required :status, enum: -> { OpenAI::Beta::BetaResponseItem::ImageGenerationCall::Status }

#typeSymbol, :image_generation_call

The type of the image generation call. Always image_generation_call.

Returns:

  • (Symbol, :image_generation_call)


851
# File 'lib/openai/models/beta/beta_response_item.rb', line 851

required :type, const: :image_generation_call

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/beta/beta_response_item.rb', line 964