重构:继续移除对 debug_info 的依赖,主要模块已完成迁移
All checks were successful
构建并部署 AI Agent 服务 / deploy (push) Successful in 7m28s
All checks were successful
构建并部署 AI Agent 服务 / deploy (push) Successful in 7m28s
This commit is contained in:
@@ -219,8 +219,8 @@ def route_from_hybrid_decision(state: MainGraphState) -> str:
|
|||||||
|
|
||||||
|
|
||||||
def check_fast_path_success(state: MainGraphState) -> str:
|
def check_fast_path_success(state: MainGraphState) -> str:
|
||||||
"""检查快速路径是否成功"""
|
"""检查快速路径是否成功 - 使用新的结构化字段"""
|
||||||
if state.debug_info.get("fast_path_failed"):
|
if state.fast_path.failed:
|
||||||
info("[Fast Path Check] 快速路径失败,升级到 React 循环")
|
info("[Fast Path Check] 快速路径失败,升级到 React 循环")
|
||||||
return "escalate"
|
return "escalate"
|
||||||
|
|
||||||
|
|||||||
@@ -45,8 +45,8 @@ def route_by_reasoning(state: MainGraphState) -> str:
|
|||||||
|
|
||||||
info(f"[条件路由] step={state.reasoning_step}, phase={state.current_phase}, history={previous_actions}")
|
info(f"[条件路由] step={state.reasoning_step}, phase={state.current_phase}, history={previous_actions}")
|
||||||
|
|
||||||
# ========== 获取推理结果 ==========
|
# ========== 获取推理结果 - 从新的结构化字段获取 ==========
|
||||||
reasoning_result = state.debug_info.get("reasoning_result")
|
reasoning_result = state.react_reasoning.reasoning_result
|
||||||
latest_action = reasoning_result.action.name if reasoning_result else None
|
latest_action = reasoning_result.action.name if reasoning_result else None
|
||||||
|
|
||||||
# ========== 核心检查:DIRECT_RESPONSE 优先 ==========
|
# ========== 核心检查:DIRECT_RESPONSE 优先 ==========
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ async def web_search_node(state: MainGraphState, config: Optional[RunnableConfig
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
info(f"[web_search_node] 无法发送开始事件: {e}")
|
info(f"[web_search_node] 无法发送开始事件: {e}")
|
||||||
|
|
||||||
# 获取搜索查询
|
# 获取搜索查询 - 从新的结构化字段获取
|
||||||
reasoning_result = state.debug_info.get("reasoning_result")
|
reasoning_result = state.react_reasoning.reasoning_result
|
||||||
search_query = reasoning_result.metadata.get("search_query", state.user_query) if reasoning_result else state.user_query
|
search_query = reasoning_result.metadata.get("search_query", state.user_query) if reasoning_result else state.user_query
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user