Class: LlmCostTracker::Configuration::Capture
- Defined in:
- lib/llm_cost_tracker/configuration/capture.rb
Constant Summary collapse
- OPENAI_COMPATIBLE_PROVIDERS =
{ "openrouter.ai" => "openrouter", "api.deepseek.com" => "deepseek", "api.groq.com" => "groq" }.freeze
Instance Attribute Summary collapse
-
#openai_compatible_providers ⇒ Object
Returns the value of attribute openai_compatible_providers.
Instance Method Summary collapse
- #finalize! ⇒ Object
-
#initialize(owner) ⇒ Capture
constructor
A new instance of Capture.
Methods inherited from Section
Constructor Details
#initialize(owner) ⇒ Capture
Returns a new instance of Capture.
18 19 20 21 22 |
# File 'lib/llm_cost_tracker/configuration/capture.rb', line 18 def initialize(owner) super @request_stream_usage = true self.openai_compatible_providers = OPENAI_COMPATIBLE_PROVIDERS end |
Instance Attribute Details
#openai_compatible_providers ⇒ Object
Returns the value of attribute openai_compatible_providers.
16 17 18 |
# File 'lib/llm_cost_tracker/configuration/capture.rb', line 16 def openai_compatible_providers @openai_compatible_providers end |
Instance Method Details
#finalize! ⇒ Object
29 30 31 |
# File 'lib/llm_cost_tracker/configuration/capture.rb', line 29 def finalize! @openai_compatible_providers = deep_freeze(normalize_providers(@openai_compatible_providers)) end |