mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-26 15:49:42 +02:00
Merge pull request #617 from iorisa/fixbug/geekan/dev_recover
fixbug: 基于全memory数据存储的流程异常恢复
This commit is contained in:
commit
331958a63c
7 changed files with 49 additions and 8 deletions
|
|
@ -51,3 +51,7 @@ async def test_write_code_invalid_code(mocker):
|
|||
|
||||
# Assert that the returned code is the same as the invalid code string
|
||||
assert code == "Invalid Code String"
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
pytest.main([__file__, "-s"])
|
||||
|
|
|
|||
|
|
@ -93,4 +93,8 @@ async def test_role_serdeser_interrupt():
|
|||
assert new_role_a._rc.state == 1
|
||||
|
||||
with pytest.raises(Exception):
|
||||
await role_c.run(with_message=Message(content="demo", cause_by=UserRequirement))
|
||||
await new_role_a.run(with_message=Message(content="demo", cause_by=UserRequirement))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
pytest.main([__file__, "-s"])
|
||||
|
|
|
|||
|
|
@ -85,3 +85,4 @@ class RoleC(Role):
|
|||
self._init_actions([ActionOK, ActionRaise])
|
||||
self._watch([UserRequirement])
|
||||
self._rc.react_mode = RoleReactMode.BY_ORDER
|
||||
self._rc.memory.ignore_id = True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue