fix: count_seeds empty body handling

Fix count_seeds() to always pass valid JSON body to Qdrant count API.
Empty dict {} was causing EOF error when no source filter provided.
This commit is contained in:
Accusys
2026-06-25 02:02:17 +08:00
parent d20819b03b
commit b19b1a8c46

View File

@@ -605,7 +605,7 @@ def count_seeds(source: str = None) -> int:
"""
ensure_seeds_collection()
body = {}
body = {} # Always pass empty body for count
if source:
body["filter"] = {
"must": [
@@ -613,7 +613,7 @@ def count_seeds(source: str = None) -> int:
]
}
result = qdrant_request("POST", f"/collections/{SEEDS_COLLECTION}/points/count", body)
result = qdrant_request("POST", f"/collections/{SEEDS_COLLECTION}/points/count", body if body else {})
return result.get("result", {}).get("count", 0)