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:
@@ -605,7 +605,7 @@ def count_seeds(source: str = None) -> int:
|
|||||||
"""
|
"""
|
||||||
ensure_seeds_collection()
|
ensure_seeds_collection()
|
||||||
|
|
||||||
body = {}
|
body = {} # Always pass empty body for count
|
||||||
if source:
|
if source:
|
||||||
body["filter"] = {
|
body["filter"] = {
|
||||||
"must": [
|
"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)
|
return result.get("result", {}).get("count", 0)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user