correct command output in quick

This commit is contained in:
garylin2099 2024-08-19 17:11:05 +08:00
parent 86e0ad0218
commit 9908361577

View file

@ -297,6 +297,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
answer = ""
intent_result = "TASK"
elif "SEARCH" in intent_result:
query = "\n".join(str(msg) for msg in memory)
answer = await SearchEnhancedQA().run(query)