⚙️ chore: Resolve Build Warning, Package Cleanup, Robust Temp Chat Time (#9962)
Some checks are pending
Docker Dev Branch Images Build / build (Dockerfile, lc-dev, node) (push) Waiting to run
Docker Dev Branch Images Build / build (Dockerfile.multi, lc-dev-api, api-build) (push) Waiting to run

* ⚙️ chore: Resolve Build Warning and `keyvMongo` types

* 🔄 chore: Update mongodb version to ^6.14.2 in package.json and package-lock.json

* chore: remove @langchain/openai dep

* 🔄 refactor: Change log level from warn to debug for missing endpoint config

* 🔄 refactor: Improve temp chat expiration date calculation in tests and implementation
This commit is contained in:
Danny Avila 2025-10-04 01:53:37 -04:00 committed by GitHub
parent c0ed738aed
commit 1b8a0bfaee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 131 additions and 254 deletions

View file

@ -1,7 +1,8 @@
import mongoose from 'mongoose';
import { EventEmitter } from 'events';
import { GridFSBucket } from 'mongodb';
import { logger } from '@librechat/data-schemas';
import { GridFSBucket, type Db, type ReadPreference, type Collection } from 'mongodb';
import type { Db, ReadPreference, Collection } from 'mongodb';
interface KeyvMongoOptions {
url?: string;
@ -103,7 +104,7 @@ class KeyvMongoCustom extends EventEmitter {
const stream = client.bucket.openDownloadStreamByName(key);
return new Promise((resolve) => {
const resp: Buffer[] = [];
const resp: Uint8Array[] = [];
stream.on('error', () => {
resolve(undefined);
});
@ -113,7 +114,7 @@ class KeyvMongoCustom extends EventEmitter {
resolve(data);
});
stream.on('data', (chunk: Buffer) => {
stream.on('data', (chunk: Uint8Array) => {
resp.push(chunk);
});
});