Class: OpenAI::Models::DecisionInputImage
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::DecisionInputImage
- Defined in:
- lib/openai/models/decision_input_image.rb,
sig/openai/models/decision_input_image.rbs
Defined Under Namespace
Modules: Detail
Instance Attribute Summary collapse
-
#detail ⇒ OpenAI::Models::DecisionInputImage::detail?
The image detail level, using the selected model's image profile.
-
#image_url ⇒ String
A base64-encoded image in a data URL or a publicly accessible HTTP(S) image URL.
-
#prompt_cache_breakpoint ⇒ (OpenAI::DecisionPromptCacheBreakpoint
Marks the exact end of a reusable prompt prefix.
- #type ⇒ Symbol, :input_image
Attributes inherited from Internal::Type::BaseModel
Instance Method Summary collapse
-
#initialize(image_url:, detail: nil, prompt_cache_breakpoint: nil, type: :input_image) ⇒ DecisionInputImage
constructor
A new instance of DecisionInputImage.
- #to_hash ⇒ { image_url: String, ?type: :input_image, ?detail: OpenAI::Models::DecisionInputImage::detail?, ?prompt_cache_breakpoint: (OpenAI::DecisionPromptCacheBreakpoint | OpenAI::Models::decision_prompt_cache_breakpoint)? }
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_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, 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:, detail: nil, prompt_cache_breakpoint: nil, type: :input_image) ⇒ DecisionInputImage
Returns a new instance of DecisionInputImage.
|
|
# File 'lib/openai/models/decision_input_image.rb', line 32
|
Instance Attribute Details
#detail ⇒ OpenAI::Models::DecisionInputImage::detail?
The image detail level, using the selected model's image profile. Defaults to auto.
22 |
# File 'lib/openai/models/decision_input_image.rb', line 22 optional :detail, enum: -> { OpenAI::DecisionInputImage::Detail }, nil?: true |
#image_url ⇒ String
A base64-encoded image in a data URL or a publicly accessible HTTP(S) image URL.
10 |
# File 'lib/openai/models/decision_input_image.rb', line 10 required :image_url, String |
#prompt_cache_breakpoint ⇒ (OpenAI::DecisionPromptCacheBreakpoint
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.
30 |
# File 'lib/openai/models/decision_input_image.rb', line 30 optional :prompt_cache_breakpoint, -> { OpenAI::DecisionPromptCacheBreakpoint }, nil?: true |
#type ⇒ Symbol, :input_image
15 |
# File 'lib/openai/models/decision_input_image.rb', line 15 required :type, const: :input_image |
Instance Method Details
#to_hash ⇒ { image_url: String, ?type: :input_image, ?detail: OpenAI::Models::DecisionInputImage::detail?, ?prompt_cache_breakpoint: (OpenAI::DecisionPromptCacheBreakpoint | OpenAI::Models::decision_prompt_cache_breakpoint)? }
45 46 47 48 49 50 51 |
# File 'sig/openai/models/decision_input_image.rbs', line 45
def to_hash: -> {
image_url: String,
?type: :input_image,
?detail: OpenAI::Models::DecisionInputImage::detail?,
?prompt_cache_breakpoint: (OpenAI::DecisionPromptCacheBreakpoint
| OpenAI::Models::decision_prompt_cache_breakpoint)?
}
|