mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-22 08:12:00 +02: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;
|