mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-03 06:12:14 +08:00
Add a new "analysis" step type to handle reasoning and synthesis tasks that don't require code execution, addressing the concern that routing all non-search tasks to the coder agent was inappropriate. Changes: - Add ANALYSIS enum value to StepType in planner_model.py - Create analyst_node for pure LLM reasoning without tools - Update graph routing to route analysis steps to analyst agent - Add analyst agent to AGENT_LLM_MAP configuration - Create analyst prompts (English and Chinese) - Update planner prompts with guidance on choosing between analysis (reasoning/synthesis) and processing (code execution) - Change default step_type inference from "processing" to "analysis" when need_search=false Co-authored-by: Willem Jiang <143703838+willem-bd@users.noreply.github.com>
22 lines
551 B
Python
22 lines
551 B
Python
# Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
from typing import Literal
|
|
|
|
# Define available LLM types
|
|
LLMType = Literal["basic", "reasoning", "vision", "code"]
|
|
|
|
# Define agent-LLM mapping
|
|
AGENT_LLM_MAP: dict[str, LLMType] = {
|
|
"coordinator": "basic",
|
|
"planner": "basic",
|
|
"researcher": "basic",
|
|
"analyst": "basic",
|
|
"coder": "basic",
|
|
"reporter": "basic",
|
|
"podcast_script_writer": "basic",
|
|
"ppt_composer": "basic",
|
|
"prose_writer": "basic",
|
|
"prompt_enhancer": "basic",
|
|
}
|