Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -115,7 +115,10 @@ def tool_node(state: AgentState) -> AgentState:
|
|
115 |
global tool_counter
|
116 |
if tool_counter >= 5:
|
117 |
# If we've already run 5 tools, do nothing
|
118 |
-
return {
|
|
|
|
|
|
|
119 |
|
120 |
tool_counter += 1
|
121 |
|
|
|
115 |
global tool_counter
|
116 |
if tool_counter >= 5:
|
117 |
# If we've already run 5 tools, do nothing
|
118 |
+
return {
|
119 |
+
"messages": state["messages"],
|
120 |
+
"final_answer": state.get("final_answer", "No interim answer available.")
|
121 |
+
}
|
122 |
|
123 |
tool_counter += 1
|
124 |
|