🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
refactor: Update according to Chapter 2.1.3.2 of RFC 116
莘权 马f47977daa813
diff --git a/metagpt/roles/role.py b/metagpt/roles/role.pyindex 5bc241352..32fa16e6a 100644--- a/metagpt/roles/role.py+++ b/metagpt/roles/role.py@@ -139,6 +139,8 @@ class Role:"""Listen to the corresponding behaviors in private message buffer"""tags = {get_class_name(t) for t in actions}self._rc.watch.update(tags)+ # check RoleContext after adding watch actions+ self._rc.check(self._role_id)def subscribe(self, tags: Set[str]):"""Listen to the corresponding behaviors"""