class ActiveGenie::Config::Providers::ProviderBase

def api_key

Returns:
  • (String, nil) - The API key.
def api_key
  raise NotImplementedError, 'Subclasses must implement this method'
end

def api_url

Returns:
  • (String) - The API base URL.
def api_url
  raise NotImplementedError, 'Subclasses must implement this method'
end

def client

Returns:
  • (ActiveGenie::Clients::OpenaiClient) - The client instance.
def client
  raise NotImplementedError, 'Subclasses must implement this method'
end

def to_h(config = {})

Returns:
  • (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:,
    **config
  }
end

def valid?

Returns:
  • (Boolean) - True if the configuration is valid, false otherwise.
def valid?
  api_key && api_url
end