adding deps

This commit is contained in:
Pavel Duchovny 2025-02-19 17:59:50 +02:00
parent 5cfd0bee11
commit a4fbf0a8f3
2 changed files with 3 additions and 2 deletions

View file

@ -155,14 +155,13 @@ export class VectorStoreMongoDBAtlas extends createVectorStoreNode({
await client.connect();
const db = client.db(credentials.database as string);
const collection = db.collection(collectionName);
// Check if collection exists
const collections = await db.listCollections({ name: collectionName }).toArray();
if (collections.length === 0) {
db.createCollection(collectionName);
}
const collection = db.collection(collectionName);
await MongoDBAtlasVectorSearch.fromDocuments(documents, embeddings, {
collection,
indexName: vectorIndexName, // Default index name

View file

@ -149,6 +149,7 @@
"@langchain/google-vertexai": "0.1.8",
"@langchain/groq": "0.1.3",
"@langchain/mistralai": "0.2.0",
"@langchain/mongodb": "^0.1.0",
"@langchain/ollama": "0.1.4",
"@langchain/openai": "0.3.17",
"@langchain/pinecone": "0.1.3",
@ -176,6 +177,7 @@
"lodash": "catalog:",
"mammoth": "1.7.2",
"mime-types": "2.1.35",
"mongodb": "6.11.0",
"n8n-nodes-base": "workspace:*",
"n8n-workflow": "workspace:*",
"openai": "4.78.1",