Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -49,7 +49,7 @@ graph.add_node("tools", tool_node)
|
|
49 |
graph.add_edge(
|
50 |
START,
|
51 |
"agent",
|
52 |
-
|
53 |
)
|
54 |
|
55 |
# Edge C: "tools" → "agent"
|
@@ -57,7 +57,7 @@ graph.add_edge(
|
|
57 |
graph.add_edge(
|
58 |
"tools",
|
59 |
"agent",
|
60 |
-
|
61 |
)
|
62 |
|
63 |
# 7) Use add_conditional_edges out of "agent" instead of two separate edges
|
|
|
49 |
graph.add_edge(
|
50 |
START,
|
51 |
"agent",
|
52 |
+
lambda state, user_input: {"messages": [user_input]},
|
53 |
)
|
54 |
|
55 |
# Edge C: "tools" → "agent"
|
|
|
57 |
graph.add_edge(
|
58 |
"tools",
|
59 |
"agent",
|
60 |
+
lambda state, tool_output: tool_output,
|
61 |
)
|
62 |
|
63 |
# 7) Use add_conditional_edges out of "agent" instead of two separate edges
|