Skip to content

Commit daf3e99

Browse files
authored
fixing from_documents method of the MongoDB Atlas vector store (langchain-ai#5794)
FIxed a bug in from_documents method --> Collection objects do not implement truth value testing or bool(). @dev2049
1 parent b177a29 commit daf3e99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

langchain/vectorstores/mongodb_atlas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ def from_texts(
262262
collection=collection
263263
)
264264
"""
265-
if not collection:
265+
if collection is None:
266266
raise ValueError("Must provide 'collection' named parameter.")
267267
vecstore = cls(collection, embedding, **kwargs)
268268
vecstore.add_texts(texts, metadatas=metadatas)

0 commit comments

Comments
 (0)