From 0f1691b5785f83a712479067f3932ec17679d992 Mon Sep 17 00:00:00 2001 From: root <953994191@qq.com> Date: Wed, 6 May 2026 14:36:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=20msgpack=20=E5=BA=8F=E5=88=97=E5=8C=96=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=EF=BC=8C=E5=8A=A0=E5=85=A5=E6=96=B0=E7=9A=84=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复问题: 1. 更新模块路径从 "app.core.intent" 到 "backend.app.core.intent" 2. 添加新的状态类型: - ReactReasoningState - HybridRouterState - FastPathState 3. 添加 HybridRouterResult --- backend/app/agent/agent_service.py | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/backend/app/agent/agent_service.py b/backend/app/agent/agent_service.py index ad02087..9d0f59a 100644 --- a/backend/app/agent/agent_service.py +++ b/backend/app/agent/agent_service.py @@ -25,15 +25,24 @@ from ..main_graph.state import MainGraphState, CurrentAction def create_serde() -> JsonPlusSerializer: """创建带自定义类型注册的序列化器""" from backend.app.core.intent import ReasoningAction, RetrievalConfig, ReasoningResult + from backend.app.main_graph.state import ( + CurrentAction, ErrorSeverity, ErrorRecord, + ReactReasoningState, HybridRouterState, FastPathState + ) + from backend.app.main_graph.nodes.hybrid_router import HybridRouterResult return JsonPlusSerializer( allowed_msgpack_modules=[ - ("app.core.intent", "ReasoningAction"), - ("app.core.intent", "RetrievalConfig"), - ("app.core.intent", "ReasoningResult"), - ("app.main_graph.state", "CurrentAction"), - ("app.main_graph.state", "ErrorSeverity"), - ("app.main_graph.state", "ErrorRecord"), + ("backend.app.core.intent", "ReasoningAction"), + ("backend.app.core.intent", "RetrievalConfig"), + ("backend.app.core.intent", "ReasoningResult"), + ("backend.app.main_graph.state", "CurrentAction"), + ("backend.app.main_graph.state", "ErrorSeverity"), + ("backend.app.main_graph.state", "ErrorRecord"), + ("backend.app.main_graph.state", "ReactReasoningState"), + ("backend.app.main_graph.state", "HybridRouterState"), + ("backend.app.main_graph.state", "FastPathState"), + ("backend.app.main_graph.nodes.hybrid_router", "HybridRouterResult"), ] )