🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
refactor: update notations
莘权 马e667fb4f00e1
diff --git a/metagpt/roles/role.py b/metagpt/roles/role.pyindex 79a9fb2de..753c22134 100644--- a/metagpt/roles/role.py+++ b/metagpt/roles/role.py@@ -258,14 +258,14 @@ class Role(Named):async def run(self, test_message=None):"""Observe, and think and act based on the results of the observation"""if test_message: # For test- seed = None+ msg = Noneif isinstance(test_message, str):- seed = Message(test_message)+ msg = Message(test_message)elif isinstance(test_message, Message):- seed = test_message+ msg = test_messageelif isinstance(test_message, list):- seed = Message("\n".join(test_message))- self.put_message(seed)+ msg = Message("\n".join(test_message))+ self.put_message(msg)if not await self._observe():# If there is no new information, suspend and wait