Class: AiRspecWriter::Configuration
- Inherits:
-
Object
- Object
- AiRspecWriter::Configuration
- Defined in:
- lib/ai_rspec_writer/configuration.rb
Instance Attribute Summary collapse
-
#ai_provider ⇒ Object
Returns the value of attribute ai_provider.
-
#chatgpt_api_key ⇒ Object
Returns the value of attribute chatgpt_api_key.
-
#chatgpt_model ⇒ Object
Returns the value of attribute chatgpt_model.
-
#gemini_api_key ⇒ Object
Returns the value of attribute gemini_api_key.
-
#gemini_model ⇒ Object
Returns the value of attribute gemini_model.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
6 7 8 9 10 11 12 |
# File 'lib/ai_rspec_writer/configuration.rb', line 6 def initialize @chatgpt_api_key = ENV.fetch("CHATGPT_API_KEY", nil) @gemini_api_key = ENV.fetch("GEMINI_API_KEY", nil) @ai_provider = ENV.fetch("DEFAULT_AI", "chatgpt") @chatgpt_model = ENV.fetch("CHATGPT_MODEL", "o3-mini") @gemini_model = ENV.fetch("GEMINI_MODEL", "gemini-2.0-flash") end |
Instance Attribute Details
#ai_provider ⇒ Object
Returns the value of attribute ai_provider.
4 5 6 |
# File 'lib/ai_rspec_writer/configuration.rb', line 4 def ai_provider @ai_provider end |
#chatgpt_api_key ⇒ Object
Returns the value of attribute chatgpt_api_key.
4 5 6 |
# File 'lib/ai_rspec_writer/configuration.rb', line 4 def chatgpt_api_key @chatgpt_api_key end |
#chatgpt_model ⇒ Object
Returns the value of attribute chatgpt_model.
4 5 6 |
# File 'lib/ai_rspec_writer/configuration.rb', line 4 def chatgpt_model @chatgpt_model end |
#gemini_api_key ⇒ Object
Returns the value of attribute gemini_api_key.
4 5 6 |
# File 'lib/ai_rspec_writer/configuration.rb', line 4 def gemini_api_key @gemini_api_key end |
#gemini_model ⇒ Object
Returns the value of attribute gemini_model.
4 5 6 |
# File 'lib/ai_rspec_writer/configuration.rb', line 4 def gemini_model @gemini_model end |