🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
add thought report
shenchuchengb53511711ebc
diff --git a/metagpt/roles/di/role_zero.py b/metagpt/roles/di/role_zero.pyindex 91b39f5ba..49b6c3616 100644--- a/metagpt/roles/di/role_zero.py+++ b/metagpt/roles/di/role_zero.py@@ -288,7 +288,9 @@ class RoleZero(Role):# routingmemory = self.get_memories(k=4) # FIXME: A magic number for two rounds of Q&Acontext = self.llm.format_msg(memory + [UserMessage(content=QUICK_THINK_PROMPT)])- intent_result = await self.llm.aask(context, system_msgs=[self.format_quick_system_prompt()])+ async with ThoughtReporter() as reporter:+ await reporter.async_report({"type": "classify"})+ intent_result = await self.llm.aask(context, system_msgs=[self.format_quick_system_prompt()])if "QUICK" in intent_result or "AMBIGUOUS" in intent_result: # llm call with the original contextasync with ThoughtReporter(enable_llm_stream=True) as reporter: