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"), ] )