class ActiveGenie::Configuration::Providers::BaseConfig
def api_key
-
(String, nil)- The API key.
def api_key raise NotImplementedError, "Subclasses must implement this method" end
def api_url
-
(String)- The API base URL.
def api_url raise NotImplementedError, "Subclasses must implement this method" end
def client
-
(ActiveGenie::Clients::OpenaiClient)- The client instance.
def client raise NotImplementedError, "Subclasses must implement this method" end
def lower_tier_model
-
(String)- The lower tier model name.
def lower_tier_model raise NotImplementedError, "Subclasses must implement this method" end
def middle_tier_model
-
(String)- The middle tier model name.
def middle_tier_model raise NotImplementedError, "Subclasses must implement this method" end
def tier_to_model(tier)
-
(String)- The corresponding model name.
Parameters:
-
tier(Symbol, String, nil) -- The symbolic tier name.
def tier_to_model(tier) { lower_tier: lower_tier_model, middle_tier: middle_tier_model, upper_tier: upper_tier_model }[tier&.to_sym] || lower_tier_model end
def to_h(config = {})
-
(Hash)- The configuration settings as a hash.
Parameters:
-
config(Hash) -- Additional key-value pairs to merge into the hash.
def to_h(config = {}) { name: NAME, api_key:, api_url:, lower_tier_model:, middle_tier_model:, upper_tier_model:, **config } end
def upper_tier_model
-
(String)- The upper tier model name.
def upper_tier_model raise NotImplementedError, "Subclasses must implement this method" end
def valid?
-
(Boolean)- True if the configuration is valid, false otherwise.
def valid? api_key && api_url end