mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-31 15:48:51 +01:00
13 lines
310 B
JavaScript
13 lines
310 B
JavaScript
const { AnthropicClient } = require('../../../../app');
|
|||
|
|||
const initializeClient = (req) => {
|
|||
let anthropicApiKey = req.body?.token ?? process.env.ANTHROPIC_API_KEY;
|
|||
const client = new AnthropicClient(anthropicApiKey);
|
|||
return {
|
|||
client,
|
|||
anthropicApiKey,
|
|||
};
|
|||
};
|
|||
|
|||
module.exports = initializeClient;
|