Class: OpenAI::Models::DecisionQuestionInputImage

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/decision_question_input_image.rb,
sig/openai/models/decision_question_input_image.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) ⇒ DecisionQuestionInputImage

Returns a new instance of DecisionQuestionInputImage.

Parameters:

  • image_url —

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

  • detail (defaults to: nil) —

    The image detail level, using the selected model's image profile. Defaults to auto.

  • image_url: (String)
  • detail: (OpenAI::Models::DecisionQuestionInputImage::detail, nil) (defaults to: nil)
  • type: (:input_image) (defaults to: :input_image)


# File 'lib/openai/models/decision_question_input_image.rb', line 24

Instance Attribute Details

#detail ⇒ OpenAI::Models::DecisionQuestionInputImage::detail?

The image detail level, using the selected model's image profile. Defaults to auto.

Returns:

  • (OpenAI::Models::DecisionQuestionInputImage::detail, nil)


22
# File 'lib/openai/models/decision_question_input_image.rb', line 22

optional :detail, enum: -> { OpenAI::DecisionQuestionInputImage::Detail }, nil?: true

#image_url ⇒ String

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

Returns:

  • (String)


10
# File 'lib/openai/models/decision_question_input_image.rb', line 10

required :image_url, String

#type ⇒ Symbol, :input_image

Parameters:

  • value (:input_image)

Returns:

  • (Symbol, :input_image)


15
# File 'lib/openai/models/decision_question_input_image.rb', line 15

required :type, const: :input_image

Instance Method Details

#to_hash ⇒ { image_url: String, ?type: :input_image, ?detail: OpenAI::Models::DecisionQuestionInputImage::detail? }

Returns:

  • ({ image_url: String, ?type: :input_image, ?detail: OpenAI::Models::DecisionQuestionInputImage::detail? })


31
32
33
34
35
# File 'sig/openai/models/decision_question_input_image.rbs', line 31

def to_hash: -> {
  image_url: String,
  ?type: :input_image,
  ?detail: OpenAI::Models::DecisionQuestionInputImage::detail?
}