mirror of https://github.com/kortix-ai/suna.git
Merge pull request #741 from tnfssc/fix/rm-args-functioncall
This commit is contained in:
commit
7bff257893
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue