Class: OpenAI::Models::Live::DecisionItemCreateEvent::ItemUnion::FunctionCallOutput::Output::Part::InputImage

Inherits:
Internal::Type::BaseModel
  • Object
show all
Defined in:
lib/openai/models/live/decision_item_create_event.rb,
sig/openai/models/live/decision_item_create_event.rbs

Defined Under Namespace

Modules: Detail

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(image_url:, detail: nil, type: :input_image) ⇒ InputImage

Returns a new instance of InputImage.

Parameters:

  • image_url —

    A base64-encoded image data URL or a publicly accessible HTTP(S) image URL.

  • detail (defaults to: nil) —

    The detail level of the image to be sent to the model. One of high, low, auto, or original. Defaults to auto.

  • image_url: (String)
  • detail: (OpenAI::Models::Live::DecisionItemCreateEvent::ItemUnion::FunctionCallOutput::Output::Part::InputImage::detail, nil) (defaults to: nil)
  • type: (:input_image) (defaults to: :input_image)


# File 'lib/openai/models/live/decision_item_create_event.rb', line 249

Instance Attribute Details

#detail ⇒ OpenAI::Models::Live::DecisionItemCreateEvent::ItemUnion::FunctionCallOutput::Output::Part::InputImage::detail?

The detail level of the image to be sent to the model. One of high, low, auto, or original. Defaults to auto.

Returns:

  • (OpenAI::Models::Live::DecisionItemCreateEvent::ItemUnion::FunctionCallOutput::Output::Part::InputImage::detail, nil)


241
242
243
244
245
246
247
# File 'lib/openai/models/live/decision_item_create_event.rb', line 241

optional(
  :detail,
  enum: -> {
    OpenAI::Live::DecisionItemCreateEvent::ItemUnion::FunctionCallOutput::Output::Part::InputImage::Detail
  },
  nil?: true
)

#image_url ⇒ String

A base64-encoded image data URL or a publicly accessible HTTP(S) image URL.

Returns:

  • (String)


229
# File 'lib/openai/models/live/decision_item_create_event.rb', line 229

required :image_url, String

#type ⇒ Symbol, :input_image

Parameters:

  • value (:input_image)

Returns:

  • (Symbol, :input_image)


234
# File 'lib/openai/models/live/decision_item_create_event.rb', line 234

required :type, const: :input_image

Instance Method Details

#to_hash ⇒ { image_url: String, ?type: :input_image, ?detail: OpenAI::Models::Live::DecisionItemCreateEvent::ItemUnion::FunctionCallOutput::Output::Part::InputImage::detail? }

Returns:

  • ({ image_url: String, ?type: :input_image, ?detail: OpenAI::Models::Live::DecisionItemCreateEvent::ItemUnion::FunctionCallOutput::Output::Part::InputImage::detail? })


212
213
214
215
216
# File 'sig/openai/models/live/decision_item_create_event.rbs', line 212

def to_hash: -> {
  image_url: String,
  ?type: :input_image,
  ?detail: OpenAI::Models::Live::DecisionItemCreateEvent::ItemUnion::FunctionCallOutput::Output::Part::InputImage::detail?
}