-
-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Description
Describe the bug
There are two files where json object is parsed from the model response with exception handling. These are the two files.
react.py ->
mesa-llm/mesa_llm/reasoning/react.py
Line 97 in a719dac
| formatted_response = json.loads(rsp.choices[0].message.content) |
mesa-llm/mesa_llm/reasoning/react.py
Line 148 in a719dac
| formatted_response = json.loads(rsp.choices[0].message.content) |
episodic_memory.py ->
mesa-llm/mesa_llm/memory/episodic_memory.py
Line 155 in a719dac
| formatted_response = json.loads(rsp.choices[0].message.content) |
mesa-llm/mesa_llm/memory/episodic_memory.py
Line 170 in a719dac
| formatted_response = json.loads(rsp.choices[0].message.content) |
This may throw errors when the returned response is not a json object or corrupted.
Fix
Add try-except block around the parser.
PR
I'll open a PR and link this issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels