🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
Merge branch 'mgx_ops' into fibug/quick_think_output_message_tag
黄伟韬e690488b080b
diff --cc metagpt/roles/di/role_zero.pyindex 12d46783c,ab56dfa59..d49aa702a--- a/metagpt/roles/di/role_zero.py+++ b/metagpt/roles/di/role_zero.py@@@ -299,9 -299,10 +299,13 @@@ class RoleZero(Role)self.llm.format_msg(memory),system_msgs=[QUICK_RESPONSE_SYSTEM_PROMPT.format(role_info=self._get_prefix())],)+ # If the answer contains the substring '[Message] from A to B:', remove it.+ pattern = r"\[Message\] from .+? to .+?:\s*"+ answer = re.sub(pattern, "", answer, count=1)+ if "command_name" in answer:+ # an actual TASK intent misclassified as QUICK, correct it here, FIXME: a better way is to classify it correctly in the first place+ answer = ""+ intent_result = "TASK"elif "SEARCH" in intent_result:query = "\n".join(str(msg) for msg in memory)answer = await SearchEnhancedQA().run(query)