Class: OpenAI::Models::Responses::Response::PromptCacheDiagnostics::CacheMiss
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Responses::Response::PromptCacheDiagnostics::CacheMiss
- Defined in:
- lib/openai/models/responses/response.rb,
sig/openai/models/responses/response.rbs
Defined Under Namespace
Modules: Reason
Instance Attribute Summary collapse
-
#cache_missed_tokens ⇒ Integer
The estimated number of input tokens affected after the first detected divergence.
-
#comparison_reusable_tokens ⇒ Integer?
The raw token count of the reusable prefix in the compared response.
-
#reason ⇒ OpenAI::Models::Responses::Response::PromptCacheDiagnostics::CacheMiss::reason
The reason prompt cache reuse did not occur.
- #type ⇒ Symbol, :cache_miss
Attributes inherited from Internal::Type::BaseModel
Instance Method Summary collapse
-
#initialize(cache_missed_tokens:, reason:, comparison_reusable_tokens: nil, type: :cache_miss) ⇒ CacheMiss
constructor
A new instance of CacheMiss.
- #to_hash ⇒ { cache_missed_tokens: Integer, reason: OpenAI::Models::Responses::Response::PromptCacheDiagnostics::CacheMiss::reason, ?type: :cache_miss, ?comparison_reusable_tokens: Integer }
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(cache_missed_tokens:, reason:, comparison_reusable_tokens: nil, type: :cache_miss) ⇒ CacheMiss
Returns a new instance of CacheMiss.
|
|
# File 'lib/openai/models/responses/response.rb', line 1215
|
Instance Attribute Details
#cache_missed_tokens ⇒ Integer
The estimated number of input tokens affected after the first detected divergence.
1196 |
# File 'lib/openai/models/responses/response.rb', line 1196 required :cache_missed_tokens, Integer |
#comparison_reusable_tokens ⇒ Integer?
The raw token count of the reusable prefix in the compared response.
1213 |
# File 'lib/openai/models/responses/response.rb', line 1213 optional :comparison_reusable_tokens, Integer |
#reason ⇒ OpenAI::Models::Responses::Response::PromptCacheDiagnostics::CacheMiss::reason
The reason prompt cache reuse did not occur.
1202 |
# File 'lib/openai/models/responses/response.rb', line 1202 required :reason, enum: -> { OpenAI::Responses::Response::PromptCacheDiagnostics::CacheMiss::Reason } |
#type ⇒ Symbol, :cache_miss
1207 |
# File 'lib/openai/models/responses/response.rb', line 1207 required :type, const: :cache_miss |
Instance Method Details
#to_hash ⇒ { cache_missed_tokens: Integer, reason: OpenAI::Models::Responses::Response::PromptCacheDiagnostics::CacheMiss::reason, ?type: :cache_miss, ?comparison_reusable_tokens: Integer }
1179 1180 1181 1182 1183 1184 |
# File 'sig/openai/models/responses/response.rbs', line 1179
def to_hash: -> {
cache_missed_tokens: Integer,
reason: OpenAI::Models::Responses::Response::PromptCacheDiagnostics::CacheMiss::reason,
?type: :cache_miss,
?comparison_reusable_tokens: Integer
}
|