Class: LumenLLM::Configuration
- Inherits:
-
Object
- Object
- LumenLLM::Configuration
- Defined in:
- lib/lumen_llm/configuration.rb
Instance Attribute Summary collapse
-
#cache_ttl ⇒ Object
Returns the value of attribute cache_ttl.
-
#http_open_timeout ⇒ Object
Returns the value of attribute http_open_timeout.
-
#http_read_timeout ⇒ Object
Returns the value of attribute http_read_timeout.
- #logger ⇒ Object
-
#openrouter_api_key ⇒ Object
Returns the value of attribute openrouter_api_key.
-
#openrouter_referer ⇒ Object
Returns the value of attribute openrouter_referer.
-
#openrouter_title ⇒ Object
Returns the value of attribute openrouter_title.
-
#provider_registry ⇒ Object
Returns the value of attribute provider_registry.
-
#store ⇒ Object
Returns the value of attribute store.
-
#template_path ⇒ Object
Returns the value of attribute template_path.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #logger_configured? ⇒ Boolean
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/lumen_llm/configuration.rb', line 17 def initialize @template_path = nil @logger = nil @openrouter_api_key = ENV["OPENROUTER_API_KEY"] @openrouter_referer = ENV["OPENROUTER_REFERER"] || "https://example.com" @openrouter_title = ENV["OPENROUTER_TITLE"] || "lumen-llm" @store = nil @provider_registry = nil @cache_ttl = 3600 @http_open_timeout = 10 @http_read_timeout = 60 end |
Instance Attribute Details
#cache_ttl ⇒ Object
Returns the value of attribute cache_ttl.
5 6 7 |
# File 'lib/lumen_llm/configuration.rb', line 5 def cache_ttl @cache_ttl end |
#http_open_timeout ⇒ Object
Returns the value of attribute http_open_timeout.
5 6 7 |
# File 'lib/lumen_llm/configuration.rb', line 5 def http_open_timeout @http_open_timeout end |
#http_read_timeout ⇒ Object
Returns the value of attribute http_read_timeout.
5 6 7 |
# File 'lib/lumen_llm/configuration.rb', line 5 def http_read_timeout @http_read_timeout end |
#logger ⇒ Object
30 31 32 |
# File 'lib/lumen_llm/configuration.rb', line 30 def logger @logger ||= Logger.new($stderr) end |
#openrouter_api_key ⇒ Object
Returns the value of attribute openrouter_api_key.
5 6 7 |
# File 'lib/lumen_llm/configuration.rb', line 5 def openrouter_api_key @openrouter_api_key end |
#openrouter_referer ⇒ Object
Returns the value of attribute openrouter_referer.
5 6 7 |
# File 'lib/lumen_llm/configuration.rb', line 5 def openrouter_referer @openrouter_referer end |
#openrouter_title ⇒ Object
Returns the value of attribute openrouter_title.
5 6 7 |
# File 'lib/lumen_llm/configuration.rb', line 5 def openrouter_title @openrouter_title end |
#provider_registry ⇒ Object
Returns the value of attribute provider_registry.
5 6 7 |
# File 'lib/lumen_llm/configuration.rb', line 5 def provider_registry @provider_registry end |
#store ⇒ Object
Returns the value of attribute store.
5 6 7 |
# File 'lib/lumen_llm/configuration.rb', line 5 def store @store end |
#template_path ⇒ Object
Returns the value of attribute template_path.
5 6 7 |
# File 'lib/lumen_llm/configuration.rb', line 5 def template_path @template_path end |
Instance Method Details
#logger_configured? ⇒ Boolean
34 35 36 |
# File 'lib/lumen_llm/configuration.rb', line 34 def logger_configured? !@logger.nil? end |