DrishtiSharma commited on
Commit
65c0aec
Β·
verified Β·
1 Parent(s): 71a90c7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -49,9 +49,9 @@ if openai_api_key and tavily_api_key:
49
  graph.add_node("Agent", Agent)
50
  graph.add_node("tools", tool_node)
51
 
52
- # Force tools_condition always True for testing purposes
53
  def always_true(state):
54
- return True
55
 
56
  graph.add_conditional_edges("Agent", always_true, {"True": "tools"})
57
  graph.add_edge("tools", "Agent")
@@ -80,7 +80,7 @@ if openai_api_key and tavily_api_key:
80
  latest_message = event["messages"][-1].pretty_print()
81
  outputs.append(latest_message)
82
  st.code(latest_message)
83
-
84
  if outputs:
85
  st.subheader("Intermediate Outputs")
86
  for i, output in enumerate(outputs, 1):
 
49
  graph.add_node("Agent", Agent)
50
  graph.add_node("tools", tool_node)
51
 
52
+ # Corrected Conditional Edge
53
  def always_true(state):
54
+ return "True" # Return string "True"
55
 
56
  graph.add_conditional_edges("Agent", always_true, {"True": "tools"})
57
  graph.add_edge("tools", "Agent")
 
80
  latest_message = event["messages"][-1].pretty_print()
81
  outputs.append(latest_message)
82
  st.code(latest_message)
83
+
84
  if outputs:
85
  st.subheader("Intermediate Outputs")
86
  for i, output in enumerate(outputs, 1):