Class: OpenAI::Models::Live::DecisionUserMessage::Content::Part::InputImage

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/live/decision_user_message.rb,
sig/openai/models/live/decision_user_message.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::DecisionUserMessage::Content::Part::InputImage::detail, nil) (defaults to: nil)
  • type: (:input_image) (defaults to: :input_image)


# File 'lib/openai/models/live/decision_user_message.rb', line 106

Instance Attribute Details

#detail ⇒ OpenAI::Models::Live::DecisionUserMessage::Content::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::DecisionUserMessage::Content::Part::InputImage::detail, nil)


100
101
102
103
104
# File 'lib/openai/models/live/decision_user_message.rb', line 100

optional(
  :detail,
  enum: -> { OpenAI::Live::DecisionUserMessage::Content::Part::InputImage::Detail },
  nil?: true
)

#image_url ⇒ String

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

Returns:

  • (String)


88
# File 'lib/openai/models/live/decision_user_message.rb', line 88

required :image_url, String

#type ⇒ Symbol, :input_image

Parameters:

  • value (:input_image)

Returns:

  • (Symbol, :input_image)


93
# File 'lib/openai/models/live/decision_user_message.rb', line 93

required :type, const: :input_image

Instance Method Details

#to_hash ⇒ { image_url: String, ?type: :input_image, ?detail: OpenAI::Models::Live::DecisionUserMessage::Content::Part::InputImage::detail? }

Returns:

  • ({ image_url: String, ?type: :input_image, ?detail: OpenAI::Models::Live::DecisionUserMessage::Content::Part::InputImage::detail? })


106
107
108
109
110
# File 'sig/openai/models/live/decision_user_message.rbs', line 106

def to_hash: -> {
  image_url: String,
  ?type: :input_image,
  ?detail: OpenAI::Models::Live::DecisionUserMessage::Content::Part::InputImage::detail?
}