Class: LlmCostTracker::Configuration
- Inherits:
-
Object
- Object
- LlmCostTracker::Configuration
- Defined in:
- lib/llm_cost_tracker/configuration.rb
Instance Attribute Summary collapse
-
#custom_storage ⇒ Object
Returns the value of attribute custom_storage.
-
#default_tags ⇒ Object
Returns the value of attribute default_tags.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#log_level ⇒ Object
Returns the value of attribute log_level.
-
#monthly_budget ⇒ Object
Returns the value of attribute monthly_budget.
-
#on_budget_exceeded ⇒ Object
Returns the value of attribute on_budget_exceeded.
-
#pricing_overrides ⇒ Object
Returns the value of attribute pricing_overrides.
-
#storage_backend ⇒ Object
Returns the value of attribute storage_backend.
Instance Method Summary collapse
- #active_record? ⇒ Boolean
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #log? ⇒ Boolean
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/llm_cost_tracker/configuration.rb', line 14 def initialize @enabled = true @storage_backend = :log @custom_storage = nil @default_tags = {} @on_budget_exceeded = nil @monthly_budget = nil @log_level = :info @pricing_overrides = {} end |
Instance Attribute Details
#custom_storage ⇒ Object
Returns the value of attribute custom_storage.
5 6 7 |
# File 'lib/llm_cost_tracker/configuration.rb', line 5 def custom_storage @custom_storage end |
#default_tags ⇒ Object
Returns the value of attribute default_tags.
5 6 7 |
# File 'lib/llm_cost_tracker/configuration.rb', line 5 def @default_tags end |
#enabled ⇒ Object
Returns the value of attribute enabled.
5 6 7 |
# File 'lib/llm_cost_tracker/configuration.rb', line 5 def enabled @enabled end |
#log_level ⇒ Object
Returns the value of attribute log_level.
5 6 7 |
# File 'lib/llm_cost_tracker/configuration.rb', line 5 def log_level @log_level end |
#monthly_budget ⇒ Object
Returns the value of attribute monthly_budget.
5 6 7 |
# File 'lib/llm_cost_tracker/configuration.rb', line 5 def monthly_budget @monthly_budget end |
#on_budget_exceeded ⇒ Object
Returns the value of attribute on_budget_exceeded.
5 6 7 |
# File 'lib/llm_cost_tracker/configuration.rb', line 5 def on_budget_exceeded @on_budget_exceeded end |
#pricing_overrides ⇒ Object
Returns the value of attribute pricing_overrides.
5 6 7 |
# File 'lib/llm_cost_tracker/configuration.rb', line 5 def pricing_overrides @pricing_overrides end |
#storage_backend ⇒ Object
Returns the value of attribute storage_backend.
5 6 7 |
# File 'lib/llm_cost_tracker/configuration.rb', line 5 def storage_backend @storage_backend end |
Instance Method Details
#active_record? ⇒ Boolean
25 26 27 |
# File 'lib/llm_cost_tracker/configuration.rb', line 25 def active_record? storage_backend == :active_record end |
#log? ⇒ Boolean
29 30 31 |
# File 'lib/llm_cost_tracker/configuration.rb', line 29 def log? storage_backend == :log end |