From 40cf8f32919c29d76581243adb94a4aa56b67097 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Thu, 30 Jul 2026 16:02:53 +0800 Subject: [PATCH] fix: int(total_size) + json.dumps default=str (Agent 2 review) --- wwwroot/knowledge_bases_list/storage_stats.dspy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wwwroot/knowledge_bases_list/storage_stats.dspy b/wwwroot/knowledge_bases_list/storage_stats.dspy index cdc0057..4baf47b 100644 --- a/wwwroot/knowledge_bases_list/storage_stats.dspy +++ b/wwwroot/knowledge_bases_list/storage_stats.dspy @@ -11,7 +11,7 @@ async with get_sor_context(env, 'rag') as sor: if recs: r = recs[0] docs = int(r.doc_count or 0) - size = r.total_size or 0 + size = int(r.total_size or 0) chunks = int(r.chunk_count or 0) else: docs = 0 @@ -37,4 +37,4 @@ return json.dumps({ {"widgettype": "VBox", "options": {"cwidth": pct, "cheight": 0.5, "bgcolor": "#4a90d9"}} ]} ] -}, ensure_ascii=False) +}, ensure_ascii=False, default=str)