Class: OpenAI::Models::Beta::BetaResponseInputImageContent

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/beta/beta_response_input_image_content.rb,
sig/openai/models/beta/beta_response_input_image_content.rbs

Defined Under Namespace

Modules: Detail Classes: PromptCacheBreakpoint

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Class Method Summary collapse

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

Parameters:

  • 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.

  • file_id (defaults to: nil) —

    The ID of the file to be sent to the model.

  • image_url (defaults to: nil) —

    The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

  • prompt_cache_breakpoint (defaults to: nil) —

    Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's prompt_cache_options.ttl; the boundary is not rounded to a token block.

  • type (defaults to: :input_image) —

    The type of the input item. Always input_image.



# File 'lib/openai/models/beta/beta_response_input_image_content.rb', line 45

Instance Attribute Details

#detail ⇒ OpenAI::Models::Beta::BetaResponseInputImageContent::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::Beta::BetaResponseInputImageContent::detail, nil)


18
# File 'lib/openai/models/beta/beta_response_input_image_content.rb', line 18

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

#file_id ⇒ String?

The ID of the file to be sent to the model.

Returns:

  • (String, nil)


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

optional :file_id, String, nil?: true

#image_url ⇒ String?

The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

Returns:

  • (String, nil)


31
# File 'lib/openai/models/beta/beta_response_input_image_content.rb', line 31

optional :image_url, String, nil?: true

#prompt_cache_breakpoint ⇒ OpenAI::Beta::BetaResponseInputImageContent::PromptCacheBreakpoint?

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's prompt_cache_options.ttl; the boundary is not rounded to a token block.

Returns:

  • (OpenAI::Beta::BetaResponseInputImageContent::PromptCacheBreakpoint, nil)


39
40
41
42
43
# File 'lib/openai/models/beta/beta_response_input_image_content.rb', line 39

optional(
  :prompt_cache_breakpoint,
  -> { OpenAI::Beta::BetaResponseInputImageContent::PromptCacheBreakpoint },
  nil?: true
)

#type ⇒ :input_image

The type of the input item. Always input_image.

Returns:

  • (:input_image)


11
# File 'lib/openai/models/beta/beta_response_input_image_content.rb', line 11

required :type, const: :input_image

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/beta/beta_response_input_image_content.rb', line 80

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


57
# File 'sig/openai/models/beta/beta_response_input_image_content.rbs', line 57

def to_hash: -> {