[Bug Fix] fix chromadb where clause for query and delete (#937)

Co-authored-by: Deven Patel <deven298@yahoo.com>
This commit is contained in:
Deven Patel
2023-11-10 16:04:25 -08:00
committed by GitHub
parent 744ab5156f
commit deaa7f50f8
5 changed files with 15 additions and 13 deletions

View File

@@ -478,13 +478,13 @@ class EmbedChain(JSONSerializable):
query_config = config or self.llm.config
if where is not None:
where = where
elif query_config is not None and query_config.where is not None:
where = query_config.where
else:
where = {}
if self.config.id is not None:
where.update({"app_id": self.config.id})
if query_config is not None and query_config.where is not None:
where = query_config.where
if self.config.id is not None:
where.update({"app_id": self.config.id})
# We cannot query the database with the input query in case of an image search. This is because we need
# to bring down both the image and text to the same dimension to be able to compare them.