🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
Merge pull request #522 from Stitch-z/main
geekan820315b9168c
diff --cc metagpt/roles/tutorial_assistant.pyindex 2a514f433,7c9450997..e0be4de61--- a/metagpt/roles/tutorial_assistant.py+++ b/metagpt/roles/tutorial_assistant.py@@@ -98,17 -87,8 +87,8 @@@ class TutorialAssistant(Role)self.total_content += respreturn Message(content=resp, role=self.profile)- async def _react(self) -> Message:- """Execute the assistant's think and actions.-- Returns:- A message containing the final result of the assistant's actions.- """- while True:- await self._think()- if self._rc.todo is None:- break- msg = await self._act()+ async def react(self) -> Message:+ msg = await super().react()root_path = TUTORIAL_PATH / datetime.now().strftime("%Y-%m-%d_%H-%M-%S")- await File.write(root_path, f"{self.main_title}.md", self.total_content.encode('utf-8'))+ await File.write(root_path, f"{self.main_title}.md", self.total_content.encode("utf-8"))return msg