Class: LumenLLM::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/lumen_llm/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_ttlObject

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_timeoutObject

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_timeoutObject

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

#loggerObject



30
31
32
# File 'lib/lumen_llm/configuration.rb', line 30

def logger
  @logger ||= Logger.new($stderr)
end

#openrouter_api_keyObject

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_refererObject

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_titleObject

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_registryObject

Returns the value of attribute provider_registry.



5
6
7
# File 'lib/lumen_llm/configuration.rb', line 5

def provider_registry
  @provider_registry
end

#storeObject

Returns the value of attribute store.



5
6
7
# File 'lib/lumen_llm/configuration.rb', line 5

def store
  @store
end

#template_pathObject

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

Returns:

  • (Boolean)


34
35
36
# File 'lib/lumen_llm/configuration.rb', line 34

def logger_configured?
  !@logger.nil?
end