Module: OpenAI::Models::Chat::CompletionCreateParams::PromptCacheRetention Deprecated

Extended by:
Internal::Type::Enum
Defined in:
lib/openai/models/chat/completion_create_params.rb,
sig/openai/models/chat/completion_create_params.rbs

Overview

Deprecated.

Deprecated. Use prompt_cache_options.ttl instead.

The retention policy for the prompt cache. Set to 24h to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. Learn more. This field expresses a maximum retention policy, while prompt_cache_options.ttl expresses a minimum cache lifetime. The two fields are independent and do not interact. For gpt-5.5, gpt-5.5-pro, and future models, only 24h is supported.

For older models that support both in_memory and 24h, the default depends on your organization's data retention policy:

  • Organizations without ZDR enabled default to 24h.
  • Organizations with ZDR enabled default to in_memory when prompt_cache_retention is not specified.

Constant Summary collapse

IN_MEMORY =

Returns:

  • (:in_memory)
:in_memory
PROMPT_CACHE_RETENTION_24H =

Returns:

  • (:"24h")
:"24h"

Instance Method Summary collapse

Methods included from Internal::Type::Enum

==, ===, coerce, dump, hash, inspect, to_sorbet_type, values, values

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Instance Method Details

#self?.values::Array[OpenAI::Models::Chat::CompletionCreateParams::prompt_cache_retention]

Returns:

  • (::Array[OpenAI::Models::Chat::CompletionCreateParams::prompt_cache_retention])


469
# File 'sig/openai/models/chat/completion_create_params.rbs', line 469

def self?.values: -> ::Array[OpenAI::Models::Chat::CompletionCreateParams::prompt_cache_retention]