mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
Update packages/@n8n/nodes-langchain/nodes/vector_store/VectorStoreMongoDBAtlas/VectorStoreMongoDBAtlas.node.ts
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <netroy@users.noreply.github.com>
This commit is contained in:
parent
ab82336440
commit
77394caf5c
|
@ -159,7 +159,7 @@ export class VectorStoreMongoDBAtlas extends createVectorStoreNode({
|
|||
// Check if collection exists
|
||||
const collections = await db.listCollections({ name: collectionName }).toArray();
|
||||
if (collections.length === 0) {
|
||||
db.createCollection(collectionName);
|
||||
await db.createCollection(collectionName);
|
||||
}
|
||||
const collection = db.collection(collectionName);
|
||||
await MongoDBAtlasVectorSearch.fromDocuments(documents, embeddings, {
|
||||
|
|
Loading…
Reference in a new issue