feat(providers): add Groq provider

This commit is contained in:
ItzCrazyKns 2024-05-01 19:43:06 +05:30
parent 6e304e7051
commit edc40d8fe6
No known key found for this signature in database
GPG key ID: 8162927C7CCE3065
5 changed files with 86 additions and 5 deletions

View file

@ -3,6 +3,7 @@ import { getAvailableProviders } from '../lib/providers';
import {
getChatModel,
getChatModelProvider,
getGroqApiKey,
getOllamaApiEndpoint,
getOpenaiApiKey,
updateConfig,
@ -30,6 +31,7 @@ router.get('/', async (_, res) => {
config['openeaiApiKey'] = getOpenaiApiKey();
config['ollamaApiUrl'] = getOllamaApiEndpoint();
config['groqApiKey'] = getGroqApiKey();
res.status(200).json(config);
});
@ -44,6 +46,7 @@ router.post('/', async (req, res) => {
},
API_KEYS: {
OPENAI: config.openeaiApiKey,
GROQ: config.groqApiKey,
},
API_ENDPOINTS: {
OLLAMA: config.ollamaApiUrl,