Class: OpenAI::Models::Beta::BetaResponseImageGenCallPartialImageEvent

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

Defined Under Namespace

Classes: Agent

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

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_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(item_id:, output_index:, partial_image_b64:, partial_image_index:, sequence_number:, agent: nil, background: nil, output_format: nil, quality: nil, size: nil, type: :"response.image_generation_call.partial_image") ⇒ BetaResponseImageGenCallPartialImageEvent

Returns a new instance of BetaResponseImageGenCallPartialImageEvent.

Parameters:

  • item_id —

    The unique identifier of the image generation item being processed.

  • output_index —

    The index of the output item in the response's output array.

  • partial_image_b64 —

    Base64-encoded partial image data, suitable for rendering as an image.

  • partial_image_index —

    0-based index for the partial image (backend is 1-based, but this is 0-based for the user).

  • sequence_number —

    The sequence number of the image generation item being processed.

  • agent (defaults to: nil) —

    The agent that owns this multi-agent streaming event.

  • background (defaults to: nil) —

    The background setting that was used.

  • output_format (defaults to: nil) —

    The output format that was used.

  • quality (defaults to: nil) —

    The image quality that was used.

  • size (defaults to: nil) —

    The image size that was used.

  • type (defaults to: :"response.image_generation_call.partial_image") —

    The type of the event. Always 'response.image_generation_call.partial_image'.

  • item_id: (String)
  • output_index: (Integer)
  • partial_image_b64: (String)
  • partial_image_index: (Integer)
  • sequence_number: (Integer)
  • agent: (OpenAI::Beta::BetaResponseImageGenCallPartialImageEvent::Agent, nil) (defaults to: nil)
  • background: (String) (defaults to: nil)
  • output_format: (String) (defaults to: nil)
  • quality: (String) (defaults to: nil)
  • size: (String) (defaults to: nil)
  • type: (:"response.image_generation_call.partial_image") (defaults to: :"response.image_generation_call.partial_image")


# File 'lib/openai/models/beta/beta_response_image_gen_call_partial_image_event.rb', line 74

Instance Attribute Details

#agent ⇒ OpenAI::Beta::BetaResponseImageGenCallPartialImageEvent::Agent?

The agent that owns this multi-agent streaming event.

Returns:

  • (OpenAI::Beta::BetaResponseImageGenCallPartialImageEvent::Agent, nil)


48
# File 'lib/openai/models/beta/beta_response_image_gen_call_partial_image_event.rb', line 48

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

#background ⇒ String?

The background setting that was used.

Returns:

  • (String, nil)


54
# File 'lib/openai/models/beta/beta_response_image_gen_call_partial_image_event.rb', line 54

optional :background, String

#item_id ⇒ String

The unique identifier of the image generation item being processed.

Returns:

  • (String)


11
# File 'lib/openai/models/beta/beta_response_image_gen_call_partial_image_event.rb', line 11

required :item_id, String

#output_format ⇒ String?

The output format that was used.

Returns:

  • (String, nil)


60
# File 'lib/openai/models/beta/beta_response_image_gen_call_partial_image_event.rb', line 60

optional :output_format, String

#output_index ⇒ Integer

The index of the output item in the response's output array.

Returns:

  • (Integer)


17
# File 'lib/openai/models/beta/beta_response_image_gen_call_partial_image_event.rb', line 17

required :output_index, Integer

#partial_image_b64 ⇒ String

Base64-encoded partial image data, suitable for rendering as an image.

Returns:

  • (String)


23
# File 'lib/openai/models/beta/beta_response_image_gen_call_partial_image_event.rb', line 23

required :partial_image_b64, String

#partial_image_index ⇒ Integer

0-based index for the partial image (backend is 1-based, but this is 0-based for the user).

Returns:

  • (Integer)


30
# File 'lib/openai/models/beta/beta_response_image_gen_call_partial_image_event.rb', line 30

required :partial_image_index, Integer

#quality ⇒ String?

The image quality that was used.

Returns:

  • (String, nil)


66
# File 'lib/openai/models/beta/beta_response_image_gen_call_partial_image_event.rb', line 66

optional :quality, String

#sequence_number ⇒ Integer

The sequence number of the image generation item being processed.

Returns:

  • (Integer)


36
# File 'lib/openai/models/beta/beta_response_image_gen_call_partial_image_event.rb', line 36

required :sequence_number, Integer

#size ⇒ String?

The image size that was used.

Returns:

  • (String, nil)


72
# File 'lib/openai/models/beta/beta_response_image_gen_call_partial_image_event.rb', line 72

optional :size, String

#type ⇒ :"response.image_generation_call.partial_image"

The type of the event. Always 'response.image_generation_call.partial_image'.

Returns:

  • (:"response.image_generation_call.partial_image")


42
# File 'lib/openai/models/beta/beta_response_image_gen_call_partial_image_event.rb', line 42

required :type, const: :"response.image_generation_call.partial_image"

Instance Method Details

#to_hash ⇒ { item_id: String, output_index: Integer, :partial_image_b64 => String, partial_image_index: Integer, sequence_number: Integer, ?type: :"response.image_generation_call.partial_image", ?agent: OpenAI::Beta::BetaResponseImageGenCallPartialImageEvent::Agent?, ?background: String, ?output_format: String, ?quality: String, ?size: String }

Returns:

  • ({ item_id: String, output_index: Integer, :partial_image_b64 => String, partial_image_index: Integer, sequence_number: Integer, ?type: :"response.image_generation_call.partial_image", ?agent: OpenAI::Beta::BetaResponseImageGenCallPartialImageEvent::Agent?, ?background: String, ?output_format: String, ?quality: String, ?size: String })


105
106
107
108
109
110
111
112
113
114
115
116
117
# File 'sig/openai/models/beta/beta_response_image_gen_call_partial_image_event.rbs', line 105

def to_hash: -> {
  item_id: String,
  output_index: Integer,
  :partial_image_b64 => String,
  partial_image_index: Integer,
  sequence_number: Integer,
  ?type: :"response.image_generation_call.partial_image",
  ?agent: OpenAI::Beta::BetaResponseImageGenCallPartialImageEvent::Agent?,
  ?background: String,
  ?output_format: String,
  ?quality: String,
  ?size: String
}