Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -79,10 +79,10 @@ graph.add_conditional_edges(
|
|
79 |
"final": END, # if route_agent(...) == "final", transition to END
|
80 |
}
|
81 |
)
|
82 |
-
|
83 |
def respond_to_input(user_input: str) -> str:
|
84 |
initial_state: AgentState = {"messages": []}
|
85 |
-
return
|
86 |
|
87 |
|
88 |
|
|
|
79 |
"final": END, # if route_agent(...) == "final", transition to END
|
80 |
}
|
81 |
)
|
82 |
+
compiled_graph = graph.compile()
|
83 |
def respond_to_input(user_input: str) -> str:
|
84 |
initial_state: AgentState = {"messages": []}
|
85 |
+
return compiled_graph.invoke(initial_state, user_input)
|
86 |
|
87 |
|
88 |
|