Merge pull request #741 from tnfssc/fix/rm-args-functioncall

This commit is contained in:
Sharath 2025-06-16 14:39:30 +05:30 committed by GitHub
commit 7bff257893
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -172,6 +172,10 @@ class ThreadManager:
result: List[Dict[str, Any]] = []
for msg in messages:
msg_content = msg.get('content')
# Try to parse msg_content as JSON if it's a string
if isinstance(msg_content, str):
try: msg_content = json.loads(msg_content)
except json.JSONDecodeError: pass
if isinstance(msg_content, dict):
# Create a copy to avoid modifying the original
msg_content_copy = msg_content.copy()