naman1102 commited on
Commit
dac4778
·
1 Parent(s): 9a2521c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -83,14 +83,14 @@ def route_agent(state: AgentState, agent_out):
83
  return "final"
84
 
85
  graph.add_conditional_edges(
86
- source="agent",
87
- path=route_agent,
88
- path_map={ # This keys must match route_agent(...) returns
89
- "tools": "tools", # if route_agent returns "tools", go to node "tools"
90
- "final": END # if route_agent returns "final", go to 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}")