class ActiveGenie::Configuration::Providers::OpenaiConfig
Manages API keys, organization IDs, URLs, model selections, and client instantiation.
Configuration class for the OpenAI API client.
def api_key
-
(String, nil)
- The API key.
def api_key @api_key || ENV['OPENAI_API_KEY'] end
def api_url
-
(String)
- The API base URL.
def api_url @api_url || 'https://api.openai.com/v1' end
def client
-
(ActiveGenie::Clients::OpenaiClient)
- The client instance.
def client @client ||= ::ActiveGenie::Clients::OpenaiClient.new(self) end
def lower_tier_model
-
(String)
- The lower tier model name.
def lower_tier_model @lower_tier_model || 'gpt-4o-mini' end
def middle_tier_model
-
(String)
- The middle tier model name.
def middle_tier_model @middle_tier_model || 'gpt-4o' end
def upper_tier_model
-
(String)
- The upper tier model name.
def upper_tier_model @upper_tier_model || 'o1-preview' end