Class: OpenAI::Models::Beta::Threads::ImageURL

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/beta/threads/image_url.rb,
sig/openai/models/beta/threads/image_url.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_with_error, dump, #dump, #inspect, inspect, meta_info, new_coerce_state, 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(url:, detail: nil) ⇒ Object

Parameters:

  • url —

    The external URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp.

  • detail (defaults to: nil) —

    Specifies the detail level of the image. low uses fewer tokens, you can opt in to high resolution using high. Default value is auto



# File 'lib/openai/models/beta/threads/image_url.rb', line 22


Instance Attribute Details

#detail ⇒ OpenAI::Models::Beta::Threads::ImageURL::detail?

Specifies the detail level of the image. low uses fewer tokens, you can opt in to high resolution using high. Default value is auto

Returns:

  • (OpenAI::Models::Beta::Threads::ImageURL::detail, nil)


20
# File 'lib/openai/models/beta/threads/image_url.rb', line 20

optional :detail, enum: -> { OpenAI::Beta::Threads::ImageURL::Detail }

#url ⇒ String

The external URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp.

Returns:

  • (String)


13
# File 'lib/openai/models/beta/threads/image_url.rb', line 13

required :url, String

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


37
# File 'sig/openai/models/beta/threads/image_url.rbs', line 37

def to_hash: -> {