diff --git a/__pycache__/app.cpython-313.pyc b/__pycache__/app.cpython-313.pyc index e2ee526..675f804 100644 Binary files a/__pycache__/app.cpython-313.pyc and b/__pycache__/app.cpython-313.pyc differ diff --git a/agents/__pycache__/research_agent.cpython-313.pyc b/agents/__pycache__/research_agent.cpython-313.pyc index 57fab3a..fcaafbd 100644 Binary files a/agents/__pycache__/research_agent.cpython-313.pyc and b/agents/__pycache__/research_agent.cpython-313.pyc differ diff --git a/agents/research_agent.py b/agents/research_agent.py index d68d79b..5244528 100644 --- a/agents/research_agent.py +++ b/agents/research_agent.py @@ -29,11 +29,11 @@ Be constructive but rigorous. Don't just agree; add value by challenging assumpt Context: {context}""" elif self.role == "expert_c": - return f"""You are Expert C, a Senior Strategist. + return f"""You are Expert C, a Senior Strategist and Visual Thinker. Your goal is to synthesize the final output. Combine the structural strength of Expert A with the critical insights of Expert B. Produce a final, polished, comprehensive plan or report. -Context: {context}""" +CRITICAL: You MUST include a Mermaid.js diagram (using ```mermaid code block) to visualize the timeline, process, or architecture.""" else: return "You are a helpful assistant." diff --git a/app.py b/app.py index 3f5f2d5..a7070fc 100644 --- a/app.py +++ b/app.py @@ -205,8 +205,8 @@ with st.sidebar: # ==================== 主界面逻辑 ==================== if mode == "Deep Research": - st.title("🧪 Multi-Model Council") - st.markdown("*多模型智囊团:分析 (Expert A) -> 批判 (Expert B) -> 决策 (Expert C)*") + st.title("🧪 Multi-Model Council V2") + st.markdown("*多模型智囊团:分析 (Expert A) -> 批判 (Expert B) -> 改进 (Expert A) -> 决策 (Expert C)*") # Input research_topic = st.text_area("研究/决策主题", placeholder="请输入你想深入研究或决策的主题...", height=100) diff --git a/orchestrator/__pycache__/research_manager.cpython-313.pyc b/orchestrator/__pycache__/research_manager.cpython-313.pyc index 03e900c..7c0fd17 100644 Binary files a/orchestrator/__pycache__/research_manager.cpython-313.pyc and b/orchestrator/__pycache__/research_manager.cpython-313.pyc differ diff --git a/orchestrator/research_manager.py b/orchestrator/research_manager.py index 5fe3f3c..79f3c67 100644 --- a/orchestrator/research_manager.py +++ b/orchestrator/research_manager.py @@ -61,10 +61,19 @@ class ResearchManager: yield {"type": "content", "content": chunk} yield {"type": "step_end", "output": findings_b} - # Step 3: Expert C Synthesis + # Step 3: Expert A Refinement (Innovative Optimization) + findings_a_refined = "" + yield {"type": "step_start", "step": "Expert A Refinement", "agent": self.agents["expert_a"].name, "model": self.agents["expert_a"].model_name} + prompt_a_refine = f"Expert B has critiqued your initial proposal.\nCritique: {findings_b}\n\nPlease refine your proposal to address these points. Strengthen your arguments and fix the gaps." + for chunk in self.agents["expert_a"].generate(prompt_a_refine, context): + findings_a_refined += chunk + yield {"type": "content", "content": chunk} + yield {"type": "step_end", "output": findings_a_refined} + + # Step 4: Expert C Synthesis & Visualization findings_c = "" - yield {"type": "step_start", "step": "Expert C Synthesis", "agent": self.agents["expert_c"].name, "model": self.agents["expert_c"].model_name} - prompt_c = f"Synthesize a final comprehensive plan for '{topic}' based on Expert A's proposal and Expert B's critique.\nExpert A:\n{findings_a}\nExpert B:\n{findings_b}" + yield {"type": "step_start", "step": "Expert C Synthesis & Visualization", "agent": self.agents["expert_c"].name, "model": self.agents["expert_c"].model_name} + prompt_c = f"Synthesize a final comprehensive plan for '{topic}' based on the refined proposal.\nRefined Proposal:\n{findings_a_refined}\nCritique Reference:\n{findings_b}\n\nIMPORTANT: Include a Mermaid.js diagram (sequenceDiagram, gantt, or flowchart) to visualize the roadmap or process at the end of your report." for chunk in self.agents["expert_c"].generate(prompt_c, context): findings_c += chunk yield {"type": "content", "content": chunk}