🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
fix ask human problem
garylin2099f0df3144d68e
diff --git a/metagpt/roles/di/role_zero.py b/metagpt/roles/di/role_zero.pyindex dc28e53a6..6244a39a8 100644--- a/metagpt/roles/di/role_zero.py+++ b/metagpt/roles/di/role_zero.py@@ -3,7 +3,7 @@ from __future__ import annotationsimport inspectimport jsonimport traceback-from typing import Literal, Tuple+from typing import Callable, Literal, Tuplefrom pydantic import model_validator@@ -42,7 +42,7 @@ class RoleZero(Role):# Toolstools: list[str] = [] # Use special symbol ["<all>"] to indicate use of all registered toolstool_recommender: ToolRecommender = None- tool_execution_map: dict[str, callable] = {}+ tool_execution_map: dict[str, Callable] = {}special_tool_commands: list[str] = ["Plan.finish_current_task", "end"]# Equipped with three basic tools by default for optional useeditor: Editor = Editor()@@ -247,7 +247,7 @@ class RoleZero(Role):if not isinstance(self.rc.env, MGXEnv):return "Not in MGXEnv, command will not be executed."- return await self.rc.env.get_human_input(question, sent_from=self)+ return await self.rc.env.ask_human(question, sent_from=self)async def reply_to_human(self, content: str) -> str:"""Reply to human user with the content provided. Use this when you have a clear answer or solution to the user's question."""