Fix RAG admin: vectors_count->points_count, remove unindexed order_by, make RAG_COLLECTION env-configurable

This commit is contained in:
gramps
2026-07-14 15:18:05 -07:00
parent 0b4810ce31
commit 02d1b0432c
4 changed files with 6 additions and 7 deletions
+2 -4
View File
@@ -93,9 +93,6 @@ async def rag_list_points(
scroll_body["offset"] = offset
if source:
scroll_body["filter"] = {"must": [{"match": {"key": "source", "value": source}}]}
if sort:
direction = "asc" if order == "asc" else "desc"
scroll_body["order_by"] = {"key": sort, "direction": direction}
sr = await client.post(
f"{QDRANT_URL}/collections/{RAG_COLLECTION}/points/scroll",
@@ -114,7 +111,8 @@ async def rag_list_points(
)
total = 0
if info_resp.status_code == 200:
total = info_resp.json().get("result", {}).get("vectors_count", 0)
info = info_resp.json().get("result", {})
total = info.get("points_count", info.get("vectors_count", 0))
points = []
for r in raw_points: