Class: LlmCostTracker::Configuration::Pricing

Inherits:
Section
  • Object
show all
Defined in:
lib/llm_cost_tracker/configuration/pricing.rb

Constant Summary collapse

UNKNOWN_BEHAVIORS =
%i[ignore warn raise].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Section

attributes, enum_attribute

Constructor Details

#initialize(owner) ⇒ Pricing

Returns a new instance of Pricing.



15
16
17
18
19
20
# File 'lib/llm_cost_tracker/configuration/pricing.rb', line 15

def initialize(owner)
  super
  @file = nil
  self.overrides = {}
  self.unknown_model_behavior = :warn
end

Instance Attribute Details

#overridesObject

Returns the value of attribute overrides.



13
14
15
# File 'lib/llm_cost_tracker/configuration/pricing.rb', line 13

def overrides
  @overrides
end

Instance Method Details

#finalize!Object



31
32
33
# File 'lib/llm_cost_tracker/configuration/pricing.rb', line 31

def finalize!
  @overrides = deep_freeze(@overrides || {})
end