feat(providers): add anthropic

This commit is contained in:
ItzCrazyKns 2024-07-15 21:20:16 +05:30
parent e1732b9bf2
commit f02393dbe9
No known key found for this signature in database
GPG key ID: 8162927C7CCE3065
9 changed files with 132 additions and 5 deletions

View file

@ -6,6 +6,7 @@ import {
import {
getGroqApiKey,
getOllamaApiEndpoint,
getAnthropicApiKey,
getOpenaiApiKey,
updateConfig,
} from '../config';
@ -37,6 +38,7 @@ router.get('/', async (_, res) => {
config['openaiApiKey'] = getOpenaiApiKey();
config['ollamaApiUrl'] = getOllamaApiEndpoint();
config['anthropicApiKey'] = getAnthropicApiKey();
config['groqApiKey'] = getGroqApiKey();
res.status(200).json(config);
@ -49,6 +51,7 @@ router.post('/', async (req, res) => {
API_KEYS: {
OPENAI: config.openaiApiKey,
GROQ: config.groqApiKey,
ANTHROPIC: config.anthropicApiKey,
},
API_ENDPOINTS: {
OLLAMA: config.ollamaApiUrl,