Chatoyant - v0.2.1
    Preparing search index...

    Function getApiKey

    • Get the API key for a provider from environment.

      Parameters

      • providerId: ProviderId

        The provider to get the key for

      Returns string

      The API key

      ProviderError if the API key is not set

      const key = getApiKey('openai');
      // Returns value of API_KEY_OPENAI, or throws