Class: Anthropic::Models::CacheMissModelChanged

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/cache_miss_model_changed.rb,
sig/anthropic/models/cache_miss_model_changed.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

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(cache_missed_input_tokens:, type: :model_changed) ⇒ CacheMissModelChanged

A cache_miss_reason for a request whose model or speed differs from the previous request's.

See the cache diagnostics guide to learn what to change for each reason.

Some parameter documentations has been truncated, see Anthropic::Models::CacheMissModelChanged for more details.

Parameters:

  • cache_missed_input_tokens (Integer) —

    Approximate number of input tokens that would have been read from cache had the

  • type (Symbol, :model_changed) (defaults to: :model_changed)
  • cache_missed_input_tokens: (Integer)
  • type: (:model_changed) (defaults to: :model_changed)


# File 'lib/anthropic/models/cache_miss_model_changed.rb', line 18

Instance Attribute Details

#cache_missed_input_tokens ⇒ Integer

Approximate number of input tokens that would have been read from cache had the prefix matched the previous request.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


11
# File 'lib/anthropic/models/cache_miss_model_changed.rb', line 11

required :cache_missed_input_tokens, Integer

#type ⇒ Symbol, :model_changed

Parameters:

  • value (:model_changed)

Returns:

  • (Symbol, :model_changed)


16
# File 'lib/anthropic/models/cache_miss_model_changed.rb', line 16

required :type, const: :model_changed

Instance Method Details

#to_hash ⇒ { cache_missed_input_tokens: Integer, type: :model_changed }

Returns:

  • ({ cache_missed_input_tokens: Integer, type: :model_changed })


16
17
18
19
# File 'sig/anthropic/models/cache_miss_model_changed.rbs', line 16

def to_hash: -> {
  cache_missed_input_tokens: Integer,
  type: :model_changed
}