重构:移除对 debug_info 的依赖,只使用新的结构化状态字段
Some checks failed
构建并部署 AI Agent 服务 / deploy (push) Has been cancelled
Some checks failed
构建并部署 AI Agent 服务 / deploy (push) Has been cancelled
This commit is contained in:
@@ -47,22 +47,14 @@ async def react_reason_node(state: MainGraphState, config: Optional[RunnableConf
|
||||
"timestamp": datetime.now().isoformat()
|
||||
})
|
||||
|
||||
# 步骤4: 更新调试信息(同时更新旧的 debug_info 和新的结构化字段)
|
||||
state.debug_info["last_reasoning"] = {
|
||||
"action": result.action.name,
|
||||
"confidence": result.confidence,
|
||||
"reasoning": result.reasoning
|
||||
}
|
||||
state.debug_info["reasoning_result"] = result
|
||||
state.last_action = result.action.name
|
||||
|
||||
# 更新新的结构化字段
|
||||
# 步骤3: 更新状态 - 只使用新的结构化字段
|
||||
state.react_reasoning.last_reasoning = {
|
||||
"action": result.action.name,
|
||||
"confidence": result.confidence,
|
||||
"reasoning": result.reasoning
|
||||
}
|
||||
state.react_reasoning.reasoning_result = result
|
||||
state.last_action = result.action.name
|
||||
|
||||
# 步骤5: 发送推理事件
|
||||
await dispatch_custom_event(
|
||||
|
||||
Reference in New Issue
Block a user