Class: OpenAI::Models::Chat::ChatCompletionContentPartImage

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

Defined Under Namespace

Classes: ImageURL, 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(image_url:, prompt_cache_breakpoint: nil, type: :image_url) ⇒ Object

Some parameter documentations has been truncated, see OpenAI::Models::Chat::ChatCompletionContentPartImage for more details.

Learn about image inputs.

Parameters:



# File 'lib/openai/models/chat/chat_completion_content_part_image.rb', line 27

Instance Attribute Details

#image_urlOpenAI::Models::Chat::ChatCompletionContentPartImage::ImageURL

Parameters:

  • value (OpenAI::Chat::ChatCompletionContentPartImage::ImageURL)

Returns:



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

required :image_url, -> { OpenAI::Chat::ChatCompletionContentPartImage::ImageURL }

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



24
25
# File 'lib/openai/models/chat/chat_completion_content_part_image.rb', line 24

optional :prompt_cache_breakpoint,
-> { OpenAI::Chat::ChatCompletionContentPartImage::PromptCacheBreakpoint }

#typeSymbol, :image_url

The type of the content part.

Parameters:

  • value (:image_url)

Returns:

  • (Symbol, :image_url)


16
# File 'lib/openai/models/chat/chat_completion_content_part_image.rb', line 16

required :type, const: :image_url

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/chat/chat_completion_content_part_image.rb', line 74

Instance Method Details

#to_hash{

Returns:

  • ({)


30
# File 'sig/openai/models/chat/chat_completion_content_part_image.rbs', line 30

def to_hash: -> {