Class: OpenAI::Models::Beta::ResponseCompactParams::PromptCacheOptions
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Beta::ResponseCompactParams::PromptCacheOptions
- Defined in:
- lib/openai/models/beta/response_compact_params.rb,
sig/openai/models/beta/response_compact_params.rbs
Defined Under Namespace
Instance Attribute Summary collapse
-
#mode ⇒ Symbol, ...
Controls whether OpenAI automatically creates an implicit cache breakpoint.
-
#ttl ⇒ Symbol, ...
The minimum lifetime applied to every implicit and explicit cache breakpoint written by the request.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(mode: nil, ttl: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see PromptCacheOptions for more details.
- #to_hash ⇒ {
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(mode: nil, ttl: nil) ⇒ Object
Some parameter documentations has been truncated, see OpenAI::Models::Beta::ResponseCompactParams::PromptCacheOptions for more details.
Options for prompt caching. Supported for gpt-5.6 and later models. By
default, OpenAI automatically chooses one implicit cache breakpoint. You can add
explicit breakpoints to content blocks with prompt_cache_breakpoint. Each
request can write up to four breakpoints. For cache matching, OpenAI considers
up to the latest 80 breakpoints in the conversation, without a content-block
lookback limit. Set mode to explicit to disable the implicit breakpoint. The
ttl defaults to 30m, which is currently the only supported value. See the
prompt caching guide
for current details.
|
|
# File 'lib/openai/models/beta/response_compact_params.rb', line 460
|
Instance Attribute Details
#mode ⇒ Symbol, ...
Controls whether OpenAI automatically creates an implicit cache breakpoint.
Defaults to implicit. With implicit, OpenAI creates one implicit breakpoint
and writes up to the latest three explicit breakpoints in the request. With
explicit, OpenAI does not create an implicit breakpoint and writes up to the
latest four explicit breakpoints. If there are no explicit breakpoints, the
request does not use prompt caching.
450 |
# File 'lib/openai/models/beta/response_compact_params.rb', line 450 optional :mode, enum: -> { OpenAI::Beta::ResponseCompactParams::PromptCacheOptions::Mode } |
#ttl ⇒ Symbol, ...
The minimum lifetime applied to every implicit and explicit cache breakpoint
written by the request. Defaults to 30m, which is currently the only supported
value. The backend may retain cache entries for longer.
458 |
# File 'lib/openai/models/beta/response_compact_params.rb', line 458 optional :ttl, enum: -> { OpenAI::Beta::ResponseCompactParams::PromptCacheOptions::Ttl } |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/openai/models/beta/response_compact_params.rb', line 493
|
Instance Method Details
#to_hash ⇒ {
305 |
# File 'sig/openai/models/beta/response_compact_params.rbs', line 305
def to_hash: -> {
|