LibreChat/config/connect.js
Danny Avila 50e8769340
🚀 feat: Claude 3.7 Support + Reasoning (#6008)
* fix: missing console color methods for admin scripts

* feat: Anthropic Claude 3.7 Sonnet Support

* feat: update eventsource to version 3.0.2 and upgrade @modelcontextprotocol/sdk to 1.4.1

* fix: update DynamicInput to handle number type and improve initial value logic

* feat: first pass Anthropic Reasoning (Claude 3.7)

* feat: implement streaming support in AnthropicClient with reasoning UI handling

* feat: add missing xAI (grok) models
2025-02-24 20:08:55 -05:00

38 lines
1 KiB
JavaScript

const path = require('path');
require('module-alias/register');
const moduleAlias = require('module-alias');
const basePath = path.resolve(__dirname, '..', 'api');
moduleAlias.addAlias('~', basePath);
const connectDb = require('~/lib/db/connectDb');
require('./helpers');
async function connect() {
/**
* Connect to the database
* - If it takes a while, we'll warn the user
*/
let timeout = setTimeout(() => {
console.orange(
'This is taking a while... You may need to check your connection if this fails.',
);
timeout = setTimeout(() => {
console.orange('Still going... Might as well assume the connection failed...');
timeout = setTimeout(() => {
console.orange('Error incoming in 3... 2... 1...');
}, 13000);
}, 10000);
}, 5000);
// Attempt to connect to the database
try {
console.orange('Warming up the engines...');
await connectDb();
clearTimeout(timeout);
} catch (e) {
console.error(e);
process.exit(1);
}
}
module.exports = connect;