From 8f3338f8451d21d3d82e119f0973a7a938d4d807 Mon Sep 17 00:00:00 2001 From: Gardel Date: Sat, 6 Dec 2025 07:53:10 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E8=AE=B0=E5=BF=86=E6=8F=90=E5=8F=96?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9C=AB=E5=B0=BE=E9=80=97=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/memory_graph/short_term_manager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/memory_graph/short_term_manager.py b/src/memory_graph/short_term_manager.py index cc75cd5c7..47e874ad8 100644 --- a/src/memory_graph/short_term_manager.py +++ b/src/memory_graph/short_term_manager.py @@ -186,8 +186,8 @@ class ShortTermMemoryManager: "importance": 0.7, "attributes": {{ "time": "时间信息", - "attribute1": "其他属性1" - "attribute2": "其他属性2" + "attribute1": "其他属性1", + "attribute2": "其他属性2", ... }} }} From eac1ef28699b2dabd72b2dc70be6e179a3312e43 Mon Sep 17 00:00:00 2001 From: Gardel Date: Sun, 7 Dec 2025 17:52:41 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E5=88=86=E6=9E=90=E8=AE=B0=E5=BF=86?= =?UTF-8?q?=E6=97=B6=E4=BF=AE=E5=A4=8D=E5=BC=95=E5=8F=B7=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/memory_graph/short_term_manager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/memory_graph/short_term_manager.py b/src/memory_graph/short_term_manager.py index 47e874ad8..2f94059ec 100644 --- a/src/memory_graph/short_term_manager.py +++ b/src/memory_graph/short_term_manager.py @@ -11,6 +11,7 @@ import asyncio import json import re import uuid +import json_repair from pathlib import Path from typing import Any @@ -530,7 +531,7 @@ class ShortTermMemoryManager: json_str = re.sub(r"//.*", "", json_str) json_str = re.sub(r"/\*.*?\*/", "", json_str, flags=re.DOTALL) - data = json.loads(json_str) + data = json_repair.loads(json_str) return data except json.JSONDecodeError as e: