Merge branch 'da_change' into 'mgx_ops'

correct command output in quick

See merge request pub/MetaGPT!331
This commit is contained in:
林义章 2024-08-20 03:26:01 +00:00
commit deffa27a4c
2 changed files with 8 additions and 4 deletions

View file

@ -299,6 +299,10 @@ class RoleZero(Role):
self.llm.format_msg(memory),
system_msgs=[QUICK_RESPONSE_SYSTEM_PROMPT.format(role_info=self._get_prefix())],
)
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)