fix: init metadata as empty (#348)
This commit is contained in:
@@ -118,6 +118,9 @@ class EmbedChain:
|
|||||||
if self.config.id is not None:
|
if self.config.id is not None:
|
||||||
metadatas = [{**m, "app_id": self.config.id} for m in metadatas]
|
metadatas = [{**m, "app_id": self.config.id} for m in metadatas]
|
||||||
|
|
||||||
|
# FIXME: Fix the error handling logic when metadatas or metadata is None
|
||||||
|
metadatas = metadatas if metadatas else []
|
||||||
|
metadata = metadata if metadata else {}
|
||||||
chunks_before_addition = self.count()
|
chunks_before_addition = self.count()
|
||||||
|
|
||||||
# Add metadata to each document
|
# Add metadata to each document
|
||||||
|
|||||||
Reference in New Issue
Block a user