Skip to content
This repository was archived by the owner on Nov 8, 2025. It is now read-only.

Commit 724d89d

Browse files
总结节点连边
1 parent efc36ad commit 724d89d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/main_agent/graph.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
no_tools_warning,
2323
tool_result_transport,
2424
ask_interrupt,
25+
summarization_node,
2526
tools,
2627
)
2728

@@ -35,15 +36,17 @@
3536
builder.add_node("no_tools_warning", no_tools_warning)
3637
builder.add_node("ask_interrupt", ask_interrupt)
3738
builder.add_node("tools", tools)
39+
builder.add_node("summarization", summarization_node)
3840

3941
# 添加边
4042
builder.add_edge(START, "welcome")
4143
builder.add_edge("welcome", "finish_interrupt")
4244
builder.add_edge("finish_interrupt", "agent_execution")
4345
builder.add_conditional_edges("agent_execution", should_tool, ["tools", "no_tools_warning"])
44-
builder.add_conditional_edges("tools", tool_result_transport, ["finish_interrupt", "agent_execution", "ask_interrupt"])
46+
builder.add_conditional_edges("tools", tool_result_transport, ["summarization", "agent_execution", "ask_interrupt"])
4547
builder.add_edge("ask_interrupt", "agent_execution")
4648
builder.add_edge("no_tools_warning", "agent_execution")
49+
builder.add_edge("summarization", "finish_interrupt")
4750

4851
# 编译
4952
builder.compile(name="XieshuiMainAgent", checkpointer=MemorySaver())

0 commit comments

Comments
 (0)