Skip to content

The agent engineering platform.

fixing from_documents method of the MongoDB Atlas vector store (#5794)

Paul-Emile Brotonsdaf3e99b9623
diff --git a/langchain/vectorstores/mongodb_atlas.py b/langchain/vectorstores/mongodb_atlas.py
index 78df53178c..7a16a6e069 100644
--- a/langchain/vectorstores/mongodb_atlas.py
+++ b/langchain/vectorstores/mongodb_atlas.py
@@ -262,7 +262,7 @@ class MongoDBAtlasVectorSearch(VectorStore):
collection=collection
)
"""
- if not collection:
+ if collection is None:
raise ValueError("Must provide 'collection' named parameter.")
vecstore = cls(collection, embedding, **kwargs)
vecstore.add_texts(texts, metadatas=metadatas)