add happyapi
This commit is contained in:
+5
-1
@@ -1,5 +1,6 @@
|
||||
import YouProvider from './you_providers/youProvider.mjs';
|
||||
import PerplexityProvider from './perplexity_providers/perplexityProvider.mjs';
|
||||
import HappyApiProvider from './happyapi_providers/happyApi.mjs';
|
||||
import { config as youConfig } from './config.mjs';
|
||||
import { config as perplexityConfig } from './perplexityConfig.mjs';
|
||||
|
||||
@@ -15,8 +16,11 @@ class ProviderManager {
|
||||
case 'perplexity':
|
||||
this.provider = new PerplexityProvider(perplexityConfig);
|
||||
break;
|
||||
case 'happyapi':
|
||||
this.provider = new HappyApiProvider();
|
||||
break;
|
||||
default:
|
||||
throw new Error('Invalid ACTIVE_PROVIDER. Use "you" or "perplexity".');
|
||||
throw new Error('Invalid ACTIVE_PROVIDER. Use "you", "perplexity", or "happyapi".');
|
||||
}
|
||||
|
||||
console.log(`Initialized with ${activeProvider} provider.`);
|
||||
|
||||
Reference in New Issue
Block a user