Class: ActiveGenie::Config::Providers::DeepseekConfig
- Inherits:
-
ProviderBase
- Object
- ProviderBase
- ActiveGenie::Config::Providers::DeepseekConfig
- Defined in:
- lib/active_genie/configs/providers/deepseek_config.rb
Overview
Configuration class for the DeepSeek API client. Manages API keys, organization IDs, URLs, model selections, and client instantiation.
Instance Attribute Summary
Attributes inherited from ProviderBase
Instance Method Summary collapse
-
#api_key ⇒ String?
Retrieves the API key.
-
#api_url ⇒ String
Retrieves the base API URL for DeepSeek API.
- #default_model ⇒ Object
- #valid_model?(model) ⇒ Boolean
Methods inherited from ProviderBase
Constructor Details
This class inherits a constructor from ActiveGenie::Config::Providers::ProviderBase
Instance Method Details
#api_key ⇒ String?
Retrieves the API key. Falls back to the DEEPSEEK_API_KEY environment variable if not set.
14 15 16 |
# File 'lib/active_genie/configs/providers/deepseek_config.rb', line 14 def api_key @api_key || ENV.fetch('DEEPSEEK_API_KEY', nil) end |
#api_url ⇒ String
Retrieves the base API URL for DeepSeek API. Defaults to ‘api.deepseek.com/v1’.
21 22 23 |
# File 'lib/active_genie/configs/providers/deepseek_config.rb', line 21 def api_url @api_url || 'https://api.deepseek.com/v1' end |
#default_model ⇒ Object
25 26 27 |
# File 'lib/active_genie/configs/providers/deepseek_config.rb', line 25 def default_model @default_model || 'deepseek-chat' end |
#valid_model?(model) ⇒ Boolean
29 30 31 |
# File 'lib/active_genie/configs/providers/deepseek_config.rb', line 29 def valid_model?(model) model.include?('deepseek') end |