Class: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions
- Defined in:
- lib/openai/models/beta/beta_responses_client_event.rb,
sig/openai/models/beta/beta_responses_client_event.rbs
Overview
Defined Under Namespace
Instance Attribute Summary collapse
-
#comparison_response_id ⇒ String?
The ID of a response to compare when diagnosing prompt cache reuse.
-
#mode ⇒ OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::mode?
Controls whether OpenAI automatically creates an implicit cache breakpoint.
-
#prewarm ⇒ Boolean?
Prepares the prompt cache without generating output.
-
#ttl ⇒ OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::ttl?
The minimum lifetime applied to every implicit and explicit cache breakpoint written by the request.
Attributes inherited from Internal::Type::BaseModel
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(comparison_response_id: nil, mode: nil, prewarm: nil, ttl: nil) ⇒ PromptCacheOptions
constructor
A new instance of PromptCacheOptions.
- #to_hash ⇒ { ?comparison_response_id: String?, ?mode: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::mode, ?prewarm: bool, ?ttl: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::ttl }
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(comparison_response_id: nil, mode: nil, prewarm: nil, ttl: nil) ⇒ PromptCacheOptions
Returns a new instance of PromptCacheOptions.
|
|
# File 'lib/openai/models/beta/beta_responses_client_event.rb', line 2028
|
Instance Attribute Details
#comparison_response_id ⇒ String?
The ID of a response to compare when diagnosing prompt cache reuse. Supplying this field requests prompt cache diagnostics when the feature is enabled.
1994 |
# File 'lib/openai/models/beta/beta_responses_client_event.rb', line 1994 optional :comparison_response_id, String, nil?: true |
#mode ⇒ OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::mode?
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.
2005 2006 2007 2008 |
# File 'lib/openai/models/beta/beta_responses_client_event.rb', line 2005 optional( :mode, enum: -> { OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::Mode } ) |
#prewarm ⇒ Boolean?
Prepares the prompt cache without generating output. Defaults to false. When
set to true, overrides the generate field to false.
2015 |
# File 'lib/openai/models/beta/beta_responses_client_event.rb', line 2015 optional :prewarm, OpenAI::Internal::Type::Boolean |
#ttl ⇒ OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::ttl?
The minimum lifetime applied to every implicit and explicit cache breakpoint
written by the request. Supported values are 30m (the default) and 12h. The
backend may retain cache entries for longer.
2023 2024 2025 2026 |
# File 'lib/openai/models/beta/beta_responses_client_event.rb', line 2023 optional( :ttl, enum: -> { OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::Ttl } ) |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/openai/models/beta/beta_responses_client_event.rb', line 2074
|
Instance Method Details
#to_hash ⇒ { ?comparison_response_id: String?, ?mode: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::mode, ?prewarm: bool, ?ttl: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::ttl }
1449 1450 1451 1452 1453 1454 |
# File 'sig/openai/models/beta/beta_responses_client_event.rbs', line 1449
def to_hash: -> {
?comparison_response_id: String?,
?mode: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::mode,
?prewarm: bool,
?ttl: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::ttl
}
|