🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
refactor: use MESSAGE_ROUTE_TO_NONE
莘权 马10d9f33150a5
diff --git a/metagpt/const.py b/metagpt/const.pyindex e97ffdb7d..311712013 100644--- a/metagpt/const.py+++ b/metagpt/const.py@@ -49,6 +49,7 @@ MESSAGE_ROUTE_TO = "send_to"MESSAGE_ROUTE_CAUSE_BY = "cause_by"MESSAGE_META_ROLE = "role"MESSAGE_ROUTE_TO_ALL = "<all>"+MESSAGE_ROUTE_TO_NONE = "<none>"REQUIREMENT_FILENAME = "requirement.txt"DOCS_FILE_REPO = "docs"diff --git a/metagpt/roles/qa_engineer.py b/metagpt/roles/qa_engineer.pyindex 6f0738294..eac30413a 100644--- a/metagpt/roles/qa_engineer.py+++ b/metagpt/roles/qa_engineer.py@@ -11,7 +11,7 @@ import jsonfrom metagpt.actions import DebugError, RunCode, WriteCode, WriteCodeReview, WriteTestfrom metagpt.config import CONFIG-from metagpt.const import OUTPUTS_FILE_REPO, TEST_CODES_FILE_REPO+from metagpt.const import MESSAGE_ROUTE_TO_NONE, OUTPUTS_FILE_REPO, TEST_CODES_FILE_REPOfrom metagpt.logs import loggerfrom metagpt.roles import Rolefrom metagpt.schema import Document, Message, RunCodeContext, TestingContext@@ -66,7 +66,6 @@ class QaEngineer(Role):working_directory=str(CONFIG.git_repo.workdir),additional_python_paths=[CONFIG.src_workspace],)-msg = Message(content=run_code_context.json(),role=self.profile,@@ -135,7 +134,7 @@ class QaEngineer(Role):role=self.profile,cause_by=WriteTest,sent_from=self.profile,- send_to="",+ send_to=MESSAGE_ROUTE_TO_NONE,)return result_msg@@ -160,6 +159,6 @@ class QaEngineer(Role):role=self.profile,cause_by=WriteTest,sent_from=self.profile,- send_to="",+ send_to=MESSAGE_ROUTE_TO_NONE,)return result_msg