feat: 完成资源接入
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user