Class: ActiveHarness::Costs::ModelCost
- Inherits:
-
Struct
- Object
- Struct
- ActiveHarness::Costs::ModelCost
- Defined in:
- lib/active_harness/costs.rb
Overview
Value object representing the pricing for a single model.
Instance Attribute Summary collapse
-
#cache_read_input_per_million ⇒ Object
Returns the value of attribute cache_read_input_per_million.
-
#cache_write_input_per_million ⇒ Object
Returns the value of attribute cache_write_input_per_million.
-
#context_window ⇒ Object
Returns the value of attribute context_window.
-
#id ⇒ Object
Returns the value of attribute id.
-
#input_per_million ⇒ Object
Returns the value of attribute input_per_million.
-
#max_output_tokens ⇒ Object
Returns the value of attribute max_output_tokens.
-
#name ⇒ Object
Returns the value of attribute name.
-
#output_per_million ⇒ Object
Returns the value of attribute output_per_million.
-
#provider ⇒ Object
Returns the value of attribute provider.
Instance Method Summary collapse
Instance Attribute Details
#cache_read_input_per_million ⇒ Object
Returns the value of attribute cache_read_input_per_million
57 58 59 |
# File 'lib/active_harness/costs.rb', line 57 def cache_read_input_per_million @cache_read_input_per_million end |
#cache_write_input_per_million ⇒ Object
Returns the value of attribute cache_write_input_per_million
57 58 59 |
# File 'lib/active_harness/costs.rb', line 57 def cache_write_input_per_million @cache_write_input_per_million end |
#context_window ⇒ Object
Returns the value of attribute context_window
57 58 59 |
# File 'lib/active_harness/costs.rb', line 57 def context_window @context_window end |
#id ⇒ Object
Returns the value of attribute id
57 58 59 |
# File 'lib/active_harness/costs.rb', line 57 def id @id end |
#input_per_million ⇒ Object
Returns the value of attribute input_per_million
57 58 59 |
# File 'lib/active_harness/costs.rb', line 57 def input_per_million @input_per_million end |
#max_output_tokens ⇒ Object
Returns the value of attribute max_output_tokens
57 58 59 |
# File 'lib/active_harness/costs.rb', line 57 def max_output_tokens @max_output_tokens end |
#name ⇒ Object
Returns the value of attribute name
57 58 59 |
# File 'lib/active_harness/costs.rb', line 57 def name @name end |
#output_per_million ⇒ Object
Returns the value of attribute output_per_million
57 58 59 |
# File 'lib/active_harness/costs.rb', line 57 def output_per_million @output_per_million end |
#provider ⇒ Object
Returns the value of attribute provider
57 58 59 |
# File 'lib/active_harness/costs.rb', line 57 def provider @provider end |
Instance Method Details
#inspect ⇒ Object
69 70 71 72 73 74 75 |
# File 'lib/active_harness/costs.rb', line 69 def inspect parts = ["id=#{id.inspect}", "provider=#{provider.inspect}"] parts << "input=$#{input_per_million}/M" if input_per_million parts << "output=$#{output_per_million}/M" if output_per_million parts << "ctx=#{context_window}" if context_window "#<ModelCost #{parts.join(' ')}>" end |