feat: 完成资源接入

This commit is contained in:
2026-09-24 11:58:25 +08:00
parent 5f5d733a9b
commit 57ed92aeba
26 changed files with 3471 additions and 121 deletions
+5 -5
View File
@@ -12,6 +12,7 @@ class WaitForUserNode(BaseNode):
name = "wait_for_user_node"
def process(self, state: QueryState) -> QueryState:
updated_state: QueryState = state.copy()
payload = state["clarification"].model_dump(mode="json")
while True:
# interrupt 的控制异常必须交给 LangGraph 处理
@@ -31,8 +32,7 @@ class WaitForUserNode(BaseNode):
**payload,
"error": "请选择本题有效选项或填写回答,并提供有效的大屏数据;也可设置 cancel=true 取消",
}
return {
**state,
"clarification_reply": reply,
"status": "cancelled" if reply.cancel else "running",
}
updated_state["clarification_reply"] = reply
updated_state["status"] = "cancelled" if reply.cancel else "running"
return updated_state