Class: Anthropic::Models::Beta::BetaCacheCreation

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/beta/beta_cache_creation.rb,
sig/anthropic/models/beta/beta_cache_creation.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 ⇒ BetaCacheCreation

Returns a new instance of BetaCacheCreation.

Parameters:

  • ephemeral_1h_input_tokens: (Integer)
  • ephemeral_5m_input_tokens: (Integer)


17
18
19
20
# File 'sig/anthropic/models/beta/beta_cache_creation.rbs', line 17

def initialize: (
  ephemeral_1h_input_tokens: Integer,
  ephemeral_5m_input_tokens: Integer
) -> void

Instance Attribute Details

#ephemeral_1h_input_tokens ⇒ Integer

The number of input tokens used to create the 1 hour cache entry.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


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

required :ephemeral_1h_input_tokens, Integer

#ephemeral_5m_input_tokens ⇒ Integer

The number of input tokens used to create the 5 minute cache entry.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


17
# File 'lib/anthropic/models/beta/beta_cache_creation.rb', line 17

required :ephemeral_5m_input_tokens, Integer

Instance Method Details

#to_hash ⇒ { :ephemeral_1h_input_tokens => Integer, :ephemeral_5m_input_tokens => Integer }

Returns:

  • ({ :ephemeral_1h_input_tokens => Integer, :ephemeral_5m_input_tokens => Integer })


22
23
24
25
# File 'sig/anthropic/models/beta/beta_cache_creation.rbs', line 22

def to_hash: -> {
  :ephemeral_1h_input_tokens => Integer,
  :ephemeral_5m_input_tokens => Integer
}