fix: 分析记忆时修复引号内容
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 12m19s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 12m19s
This commit is contained in:
@@ -11,7 +11,7 @@ import asyncio
|
||||
import json
|
||||
import re
|
||||
import uuid
|
||||
from datetime import datetime
|
||||
import json_repair
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
@@ -531,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:
|
||||
|
||||
Reference in New Issue
Block a user