Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -83,14 +83,14 @@ def route_agent(state: AgentState, agent_out):
|
|
83 |
return "final"
|
84 |
|
85 |
graph.add_conditional_edges(
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
"tools": "tools", # if route_agent
|
90 |
-
"final": END
|
91 |
}
|
92 |
-
# (We omit `then=` here, so there's no post-processing step.)
|
93 |
)
|
|
|
94 |
compiled_graph = graph.compile()
|
95 |
def respond_to_input(user_input: str) -> str:
|
96 |
print(f"Reached: User input: {user_input}")
|
|
|
83 |
return "final"
|
84 |
|
85 |
graph.add_conditional_edges(
|
86 |
+
"agent",
|
87 |
+
route_agent,
|
88 |
+
{
|
89 |
+
"tools": "tools", # if route_agent(...) == "tools", go to node "tools"
|
90 |
+
"final": END # if route_agent(...) == "final", go to END
|
91 |
}
|
|
|
92 |
)
|
93 |
+
|
94 |
compiled_graph = graph.compile()
|
95 |
def respond_to_input(user_input: str) -> str:
|
96 |
print(f"Reached: User input: {user_input}")
|