修复问题: 1. 更新模块路径从 "app.core.intent" 到 "backend.app.core.intent" 2. 添加新的状态类型: - ReactReasoningState - HybridRouterState - FastPathState 3. 添加 HybridRouterResult
This commit is contained in:
@@ -25,15 +25,24 @@ from ..main_graph.state import MainGraphState, CurrentAction
|
|||||||
def create_serde() -> JsonPlusSerializer:
|
def create_serde() -> JsonPlusSerializer:
|
||||||
"""创建带自定义类型注册的序列化器"""
|
"""创建带自定义类型注册的序列化器"""
|
||||||
from backend.app.core.intent import ReasoningAction, RetrievalConfig, ReasoningResult
|
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(
|
return JsonPlusSerializer(
|
||||||
allowed_msgpack_modules=[
|
allowed_msgpack_modules=[
|
||||||
("app.core.intent", "ReasoningAction"),
|
("backend.app.core.intent", "ReasoningAction"),
|
||||||
("app.core.intent", "RetrievalConfig"),
|
("backend.app.core.intent", "RetrievalConfig"),
|
||||||
("app.core.intent", "ReasoningResult"),
|
("backend.app.core.intent", "ReasoningResult"),
|
||||||
("app.main_graph.state", "CurrentAction"),
|
("backend.app.main_graph.state", "CurrentAction"),
|
||||||
("app.main_graph.state", "ErrorSeverity"),
|
("backend.app.main_graph.state", "ErrorSeverity"),
|
||||||
("app.main_graph.state", "ErrorRecord"),
|
("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"),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user