Closed lizhongv closed 3 weeks ago
pydantic 2.7.2
pydantic_core 2.18.3
It is breaking, due to this message of metagpt.roles.Role._react
function:
https://github.com/geekan/MetaGPT/blob/bc1cd11a4b284e509056cc0052ec52d20568a4ab/metagpt/roles/role.py#L466
As, role.rc.react_mode
of all roles is RoleReactMode.REACT
But even after changing Message
to WwMessage code is not printing anything after this line:
2024-06-02 20:35:05.483 | INFO | metagpt.team:invest:93 - Investment: $20.0.
Solution:
role._think()
should return True
if self.rc.todo
is not None
.
Hi, thanks for reporting the issue! The error is due to the removal of Message.restricted_to in newer versions of the core metagpt code. The solution is to customize a GameMessage(Message) in werewolf folder with the attribute. @lizhongv @Kaushal-26 Are you guys interested in making a PR to fix it? It will be wonderful if so!
Hi, thanks for reporting the issue! The error is due to the removal of Message.restricted_to in newer versions of the core metagpt code. The solution is to customize a GameMessage(Message) in werewolf folder with the attribute. @lizhongv @Kaushal-26 Are you guys interested in making a PR to fix it? It will be wonderful if so!
I think this customized game message is implemented here: https://github.com/geekan/MetaGPT/blob/46cc9b8c68cd1e13694ed5cf406ef6066ce761ab/metagpt/ext/werewolf/schema.py#L26
The issue will be solved, as you said if we always return True.
Made changes in that pull.
Thank you @Kaushal-26 for your PR. Please check again @lizhongv
Moderator、Werewolf、Witch,These three roles cover _think methods and also require return self.rc.todo is not None !
Since no further responses are needed, we will close it. Please reopen it if necessary.
When running the werewolf killing agent, the error in the above image appears. How can I solve it?