From 6730b60e0a5823eac2d66e4567f81f05d9908a4e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 21 May 2025 01:20:30 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20=E8=87=AA=E5=8A=A8=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E5=8C=96=E4=BB=A3=E7=A0=81=20[skip=20ci]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/chat/knowledge/src/utils/json_fix.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/chat/knowledge/src/utils/json_fix.py b/src/chat/knowledge/src/utils/json_fix.py index dd91499ee..53fa8f36f 100644 --- a/src/chat/knowledge/src/utils/json_fix.py +++ b/src/chat/knowledge/src/utils/json_fix.py @@ -1,6 +1,7 @@ import json from json_repair import repair_json + def _find_unclosed(json_str): """ Identifies the unclosed braces and brackets in the JSON string. @@ -94,4 +95,4 @@ def new_fix_broken_generated_json(json_str: str) -> str: return json_str # 如果有效则按原样返回 except json.JSONDecodeError: # 如果无效,则尝试修复它 - return repair_json(json_str) \ No newline at end of file + return repair_json(json_str)