forked from Archives/langchain
fixing from_documents method of the MongoDB Atlas vector store (#5794)
FIxed a bug in from_documents method --> Collection objects do not implement truth value testing or bool(). @dev2049
This commit is contained in:
parent
b177a29d3f
commit
daf3e99b96
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user