Class: OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseImageGenCallPartialWsImage

Inherits:
OpenAI::Models::Beta::BetaResponseImageGenCallPartialImageEvent show all
Defined in:
lib/openai/models/beta/beta_responses_server_event.rb,
sig/openai/models/beta/beta_responses_server_event.rbs

Instance Attribute Summary collapse

Attributes inherited from OpenAI::Models::Beta::BetaResponseImageGenCallPartialImageEvent

#agent, #background, #item_id, #output_format, #output_index, #partial_image_b64, #partial_image_index, #quality, #sequence_number, #size, #type

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 ⇒ BetaResponseImageGenCallPartialWsImage

Returns a new instance of BetaResponseImageGenCallPartialWsImage.

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 —

    The agent that owns this multi-agent streaming event.

  • background —

    The background setting that was used.

  • output_format —

    The output format that was used.

  • quality —

    The image quality that was used.

  • size —

    The image size that was used.

  • stream_id —

    The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

  • type —

    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)
  • background: (String)
  • output_format: (String)
  • quality: (String)
  • size: (String)
  • stream_id: (String)
  • type: (:"response.image_generation_call.partial_image")


2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
# File 'sig/openai/models/beta/beta_responses_server_event.rbs', line 2567

def initialize: (
  item_id: String,
  output_index: Integer,
  partial_image_b64: String,
  partial_image_index: Integer,
  sequence_number: Integer,
  ?agent: OpenAI::Beta::BetaResponseImageGenCallPartialImageEvent::Agent?,
  ?background: String,
  ?output_format: String,
  ?quality: String,
  ?size: String,
  ?stream_id: String,
  ?type: :"response.image_generation_call.partial_image"
) -> void

Instance Attribute Details

#stream_id ⇒ String?

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

Returns:

  • (String, nil)


1888
# File 'lib/openai/models/beta/beta_responses_server_event.rb', line 1888

optional :stream_id, String

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, ?stream_id: 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, ?stream_id: String })


2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
# File 'sig/openai/models/beta/beta_responses_server_event.rbs', line 2582

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,
  ?stream_id: String
}