Skip to content

Commit 60a4abb

Browse files
committed
fix: Correct RAG stats response parsing in check_railway_chromadb.py
- API returns {'stats': {...}} not {'vector_db': {...}} - Fix parsing to use stats.knowledge_documents instead of vector_db.knowledge_documents - Script now correctly shows collection document counts
1 parent baf53bb commit 60a4abb

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

scripts/check_railway_chromadb.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,14 @@ def check_railway_chromadb(backend_url: str):
6060
)
6161

6262
if stats_response.status_code == 200:
63-
stats = stats_response.json()
63+
stats_data = stats_response.json()
6464
print(" ✅ RAG stats retrieved")
6565

66-
vector_db = stats.get("vector_db", {})
67-
knowledge_docs = vector_db.get("knowledge_documents", 0)
68-
conversation_docs = vector_db.get("conversation_documents", 0)
69-
total_docs = vector_db.get("total_documents", 0)
66+
# API returns {"stats": {"knowledge_documents": X, ...}}
67+
stats = stats_data.get("stats", {})
68+
knowledge_docs = stats.get("knowledge_documents", 0)
69+
conversation_docs = stats.get("conversation_documents", 0)
70+
total_docs = stats.get("total_documents", 0)
7071

7172
print(f"\n Collection Status:")
7273
print(f" - stillme_knowledge: {knowledge_docs} documents")

0 commit comments

Comments
 (0)