Class: RobotLab::Config
- Inherits:
-
MywayConfig::Base
- Object
- MywayConfig::Base
- RobotLab::Config
- Defined in:
- lib/robot_lab/config.rb
Overview
Modern configuration class using MywayConfig for RobotLab.
Provides:
-
Nested configuration with a dedicated ‘ruby_llm:` section
-
Environment-specific settings (development, test, production)
-
XDG config file loading (~/.config/robot_lab/config.yml)
-
Environment variable overrides (ROBOT_LAB_*)
-
Automatic RubyLLM configuration application
Instance Attribute Summary collapse
-
#logger ⇒ Logger
Returns the logger instance.
Instance Method Summary collapse
-
#after_load ⇒ void
Apply RubyLLM configuration after loading.
-
#apply_ruby_llm_config! ⇒ void
Apply all RubyLLM settings from the ruby_llm configuration section.
Instance Attribute Details
#logger ⇒ Logger
Returns the logger instance.
37 |
# File 'lib/robot_lab/config.rb', line 37 attr_writer :logger |
Instance Method Details
#after_load ⇒ void
This method returns an undefined value.
Apply RubyLLM configuration after loading.
This method should be called after initialization to configure the RubyLLM gem with the values from the ruby_llm section, and to set up the template library.
54 55 56 57 |
# File 'lib/robot_lab/config.rb', line 54 def after_load apply_ruby_llm_config! apply_prompt_manager! end |
#apply_ruby_llm_config! ⇒ void
This method returns an undefined value.
Apply all RubyLLM settings from the ruby_llm configuration section.
63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/robot_lab/config.rb', line 63 def apply_ruby_llm_config! return unless ruby_llm RubyLLM.configure do |c| apply_provider_api_keys(c) apply_provider_endpoints(c) (c) apply_default_models(c) apply_connection_settings(c) (c) end end |