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

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

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

An image input to the model. Learn about image inputs

Parameters:

  • detail (Symbol, OpenAI::Models::Beta::BetaResponseInputImageContent::Detail, nil) (defaults to: nil)

    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::BetaResponseInputImageContent::PromptCacheBreakpoint, nil) (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_content.rb', line 43

Instance Attribute Details

#detailSymbol, ...

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::BetaResponseInputImageContent::detail, nil)

Returns:



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

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

#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_content.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_content.rb', line 31

optional :image_url, String, nil?: true

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

Parameters:

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

Returns:



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

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

#typeSymbol, :input_image

The type of the input item. Always input_image.

Parameters:

  • value (:input_image)

Returns:

  • (Symbol, :input_image)


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

required :type, const: :input_image

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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

Instance Method Details

#to_hash{

Returns:

  • ({)


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

def to_hash: -> {