Class: Anthropic::Models::Beta::BetaDreamUsage

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

Returns a new instance of BetaDreamUsage.

Parameters:

  • cache_creation_input_tokens: (Integer)
  • cache_read_input_tokens: (Integer)
  • input_tokens: (Integer)
  • output_tokens: (Integer)


23
24
25
26
27
28
# File 'sig/anthropic/models/beta/beta_dream_usage.rbs', line 23

def initialize: (
  cache_creation_input_tokens: Integer,
  cache_read_input_tokens: Integer,
  input_tokens: Integer,
  output_tokens: Integer
) -> void

Instance Attribute Details

#cache_creation_input_tokens ⇒ Integer

The dream's input tokens that were written to the prompt cache, for both the 5-minute and 1-hour cache durations.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


12
# File 'lib/anthropic/models/beta/beta_dream_usage.rb', line 12

required :cache_creation_input_tokens, Integer

#cache_read_input_tokens ⇒ Integer

The dream's input tokens that were read from the prompt cache.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


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

required :cache_read_input_tokens, Integer

#input_tokens ⇒ Integer

The dream's input tokens that weren't read from or written to the prompt cache.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


24
# File 'lib/anthropic/models/beta/beta_dream_usage.rb', line 24

required :input_tokens, Integer

#output_tokens ⇒ Integer

The tokens that the model generated for the dream.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


30
# File 'lib/anthropic/models/beta/beta_dream_usage.rb', line 30

required :output_tokens, Integer

Instance Method Details

#to_hash ⇒ { cache_creation_input_tokens: Integer, cache_read_input_tokens: Integer, input_tokens: Integer, output_tokens: Integer }

Returns:

  • ({ cache_creation_input_tokens: Integer, cache_read_input_tokens: Integer, input_tokens: Integer, output_tokens: Integer })


30
31
32
33
34
35
# File 'sig/anthropic/models/beta/beta_dream_usage.rbs', line 30

def to_hash: -> {
  cache_creation_input_tokens: Integer,
  cache_read_input_tokens: Integer,
  input_tokens: Integer,
  output_tokens: Integer
}