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
searx_updates
Paul-Emile Brotons 11 months ago committed by GitHub
parent b177a29d3f
commit daf3e99b96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save