Class: ActiveGenie::Configuration
- Inherits:
-
Object
- Object
- ActiveGenie::Configuration
- Defined in:
- lib/active_genie/configuration.rb
Instance Method Summary collapse
- #extractor ⇒ Object
-
#initialize(initial_config = nil) ⇒ Configuration
constructor
A new instance of Configuration.
- #lister ⇒ Object
- #llm ⇒ Object
- #log ⇒ Object
- #providers ⇒ Object
-
#ranker ⇒ Object
Modules.
- #to_h ⇒ Object
Constructor Details
#initialize(initial_config = nil) ⇒ Configuration
Returns a new instance of Configuration.
12 13 14 |
# File 'lib/active_genie/configuration.rb', line 12 def initialize(initial_config = nil) @initial_config = initial_config || {} end |
Instance Method Details
#extractor ⇒ Object
34 35 36 |
# File 'lib/active_genie/configuration.rb', line 34 def extractor @extractor ||= Config::ExtractorConfig.new(**@initial_config.fetch(:extractor, {})) end |
#lister ⇒ Object
38 39 40 |
# File 'lib/active_genie/configuration.rb', line 38 def lister @lister ||= Config::ListerConfig.new(**@initial_config.fetch(:lister, {})) end |
#llm ⇒ Object
20 21 22 |
# File 'lib/active_genie/configuration.rb', line 20 def llm @llm ||= Config::LlmConfig.new(**@initial_config.fetch(:llm, {})) end |
#log ⇒ Object
24 25 26 |
# File 'lib/active_genie/configuration.rb', line 24 def log @log ||= Config::LogConfig.new(**@initial_config.fetch(:log, {})) end |
#providers ⇒ Object
16 17 18 |
# File 'lib/active_genie/configuration.rb', line 16 def providers @providers ||= Config::ProvidersConfig.new(**@initial_config.fetch(:providers, {})) end |
#ranker ⇒ Object
Modules
30 31 32 |
# File 'lib/active_genie/configuration.rb', line 30 def ranker @ranker ||= Config::RankerConfig.new(**@initial_config.fetch(:ranker, {})) end |
#to_h ⇒ Object
42 43 44 45 46 47 48 49 50 51 |
# File 'lib/active_genie/configuration.rb', line 42 def to_h { providers: providers.to_h, llm: llm.to_h, log: log.to_h, ranker: ranker.to_h, extractor: extractor.to_h, lister: lister.to_h } end |