Class: OpenAI::Models::Beta::BetaResponseInputImage

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

Defined Under Namespace

Modules: Detail Classes: PromptCacheBreakpoint

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, 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, #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:, file_id: nil, image_url: nil, prompt_cache_breakpoint: nil, type: :input_image) ⇒ Object

Some parameter documentations has been truncated, see OpenAI::Models::Beta::BetaResponseInputImage for more details.

An image input to the model. Learn about image inputs.

Parameters:

  • detail (Symbol, OpenAI::Models::Beta::BetaResponseInputImage::Detail)

    The detail level of the image to be sent to the model. One of high, low, `au

  • file_id (String, nil) (defaults to: nil)

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

  • image_url (String, nil) (defaults to: nil)

    The URL of the image to be sent to the model. A fully qualified URL or base64 en

  • prompt_cache_breakpoint (OpenAI::Models::Beta::BetaResponseInputImage::PromptCacheBreakpoint) (defaults to: nil)

    Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL

  • type (Symbol, :input_image) (defaults to: :input_image)

    The type of the input item. Always input_image.



# File 'lib/openai/models/beta/beta_response_input_image.rb', line 41

Instance Attribute Details

#detailSymbol, OpenAI::Models::Beta::BetaResponseInputImage::Detail

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

Parameters:

  • value (OpenAI::Models::Beta::BetaResponseInputImage::detail)

Returns:



12
# File 'lib/openai/models/beta/beta_response_input_image.rb', line 12

required :detail, enum: -> { OpenAI::Beta::BetaResponseInputImage::Detail }

#file_idString?

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

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :file_id, String, nil?: true

#image_urlString?

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

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :image_url, String, nil?: true

#prompt_cache_breakpointOpenAI::Models::Beta::BetaResponseInputImage::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.



39
# File 'lib/openai/models/beta/beta_response_input_image.rb', line 39

optional :prompt_cache_breakpoint, -> { OpenAI::Beta::BetaResponseInputImage::PromptCacheBreakpoint }

#typeSymbol, :input_image

The type of the input item. Always input_image.

Parameters:

  • value (:input_image)

Returns:

  • (Symbol, :input_image)


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

required :type, const: :input_image

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/beta/beta_response_input_image.rb', line 70

Instance Method Details

#to_hash{

Returns:

  • ({)


38
# File 'sig/openai/models/beta/beta_response_input_image.rbs', line 38

def to_hash: -> {