naman1102 commited on
Commit
ad94802
·
1 Parent(s): 0b873a5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -114,6 +114,8 @@ def tool_node(state: AgentState) -> AgentState:
114
  tool_counter = state.get("tool_counter", 0)
115
  if tool_counter > 5:
116
  return {}
 
 
117
  if state.get("wiki_query"):
118
  return wikipedia_search_tool(state)
119
  if state.get("web_search_query"):
 
114
  tool_counter = state.get("tool_counter", 0)
115
  if tool_counter > 5:
116
  return {}
117
+ tool_counter += 1
118
+ state["tool_counter"] = tool_counter
119
  if state.get("wiki_query"):
120
  return wikipedia_search_tool(state)
121
  if state.get("web_search_query"):