mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-04-26 01:06:27 +02:00
fix when RoleReactMode=REACT
This commit is contained in:
parent
0f2d96a7e2
commit
3679d77f0d
2 changed files with 3 additions and 2 deletions
|
|
@ -88,6 +88,7 @@ def role_raise_decorator(func):
|
|||
newest_msgs = self._rc.env.memory.get(1)
|
||||
if len(newest_msgs) > 0:
|
||||
self._rc.memory.delete(newest_msgs[0])
|
||||
raise Exception(format_trackback_info(limit=None)) # raise again to make it captured outside
|
||||
except Exception as exp:
|
||||
if self._rc.env:
|
||||
newest_msgs = self._rc.env.memory.get(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue