Bugfix langchain astradb metadata (#4361)

* bugfix: langchain-astradb expects None or Iterable

* Update astradb.py
This commit is contained in:
Eric Hare 2024-11-01 15:39:48 -07:00 committed by GitHub
commit e6486896fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -420,8 +420,8 @@ class AstraVectorStoreComponent(LCVectorStoreComponent):
bulk_delete_concurrency=self.bulk_delete_concurrency or None,
setup_mode=setup_mode_value,
pre_delete_collection=self.pre_delete_collection,
metadata_indexing_include=[s for s in self.metadata_indexing_include if s],
metadata_indexing_exclude=[s for s in self.metadata_indexing_exclude if s],
metadata_indexing_include=[s for s in self.metadata_indexing_include if s] or None,
metadata_indexing_exclude=[s for s in self.metadata_indexing_exclude if s] or None,
collection_indexing_policy=orjson.dumps(self.collection_indexing_policy)
if self.collection_indexing_policy
else None,