Class: RubynCode::LLM::Usage

Inherits:
Data
  • Object
show all
Defined in:
lib/rubyn_code/llm/message_builder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(input_tokens:, output_tokens:, cache_creation_input_tokens: 0, cache_read_input_tokens: 0) ⇒ Usage

Returns a new instance of Usage.



22
23
24
# File 'lib/rubyn_code/llm/message_builder.rb', line 22

def initialize(input_tokens:, output_tokens:, cache_creation_input_tokens: 0, cache_read_input_tokens: 0)
  super
end

Instance Attribute Details

#cache_creation_input_tokensObject (readonly)

Returns the value of attribute cache_creation_input_tokens

Returns:

  • (Object)

    the current value of cache_creation_input_tokens



21
22
23
# File 'lib/rubyn_code/llm/message_builder.rb', line 21

def cache_creation_input_tokens
  @cache_creation_input_tokens
end

#cache_read_input_tokensObject (readonly)

Returns the value of attribute cache_read_input_tokens

Returns:

  • (Object)

    the current value of cache_read_input_tokens



21
22
23
# File 'lib/rubyn_code/llm/message_builder.rb', line 21

def cache_read_input_tokens
  @cache_read_input_tokens
end

#input_tokensObject (readonly)

Returns the value of attribute input_tokens

Returns:

  • (Object)

    the current value of input_tokens



21
22
23
# File 'lib/rubyn_code/llm/message_builder.rb', line 21

def input_tokens
  @input_tokens
end

#output_tokensObject (readonly)

Returns the value of attribute output_tokens

Returns:

  • (Object)

    the current value of output_tokens



21
22
23
# File 'lib/rubyn_code/llm/message_builder.rb', line 21

def output_tokens
  @output_tokens
end