Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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"):
|