Class: Anthropic::Models::CacheMissToolsChanged

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/cache_miss_tools_changed.rb,
sig/anthropic/models/cache_miss_tools_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: :tools_changed) ⇒ CacheMissToolsChanged

A cache_miss_reason for a request whose tools differ from the previous request's, for example because tools were added, removed, or reordered.

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

Some parameter documentations has been truncated, see Anthropic::Models::CacheMissToolsChanged 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, :tools_changed) (defaults to: :tools_changed)
  • cache_missed_input_tokens: (Integer)
  • type: (:tools_changed) (defaults to: :tools_changed)


# File 'lib/anthropic/models/cache_miss_tools_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_tools_changed.rb', line 11

required :cache_missed_input_tokens, Integer

#type ⇒ Symbol, :tools_changed

Parameters:

  • value (:tools_changed)

Returns:

  • (Symbol, :tools_changed)


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

required :type, const: :tools_changed

Instance Method Details

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

Returns:

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


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

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