feat: 解析记忆操作 json 解析兼容
This commit is contained in:
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
import json
|
import json
|
||||||
|
import json_repair
|
||||||
import re
|
import re
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from typing import Any
|
from typing import Any
|
||||||
@@ -573,7 +574,7 @@ class LongTermMemoryManager:
|
|||||||
json_str = re.sub(r"/\*.*?\*/", "", json_str, flags=re.DOTALL)
|
json_str = re.sub(r"/\*.*?\*/", "", json_str, flags=re.DOTALL)
|
||||||
|
|
||||||
# 解析
|
# 解析
|
||||||
data = json.loads(json_str)
|
data = json_repair.loads(json_str)
|
||||||
|
|
||||||
# 转换为 GraphOperation 对象
|
# 转换为 GraphOperation 对象
|
||||||
operations = []
|
operations = []
|
||||||
|
|||||||
Reference in New Issue
Block a user