🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
feat: +exported function
莘权 马ee77d4b0fb2c
diff --git a/metagpt/roles/role.py b/metagpt/roles/role.pyindex 47f494c69..286c87eb1 100644--- a/metagpt/roles/role.py+++ b/metagpt/roles/role.py@@ -328,9 +328,16 @@ class Role:self._rc.todo = actasync def think(self) -> bool:- return await self._think()+ """The exported `think` function"""+ has_action = await self._think()+ if not has_action:+ return False+ if not self._rc.todo:+ return False+ return Trueasync def act(self) -> ActionOutput:+ """The exported `act` function"""msg = await self._act()return ActionOutput(content=msg.content,instruct_content=msg.instruct_content)