fix(chroma): return None instead of {} from _generate_where_clause for empty filters (#5713)

This commit is contained in:
Hrushikesh Yadav
2026-06-22 12:05:28 +05:30
committed by GitHub
parent 42fe129330
commit 29d131f7aa
2 changed files with 11 additions and 5 deletions
+2 -2
View File
@@ -258,7 +258,7 @@ class ChromaDB(VectorStoreBase):
dict[str, any]: Properly formatted where clause for ChromaDB.
"""
if where is None:
return {}
return None
def convert_condition(key: str, value: any) -> dict:
"""Convert universal filter format to ChromaDB format."""
@@ -352,7 +352,7 @@ class ChromaDB(VectorStoreBase):
# Return appropriate format based on number of conditions
if len(processed_filters) == 0:
return {}
return None
elif len(processed_filters) == 1:
return processed_filters[0]
else: