Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -349,7 +349,10 @@ def parser_node(state: State) -> State:
|
|
| 349 |
query_task = state["query_task"]
|
| 350 |
tool_choice = state["tool_choice"]
|
| 351 |
|
| 352 |
-
if (tool_choice
|
|
|
|
|
|
|
|
|
|
| 353 |
state["loop_again"] = "finish_gracefully"
|
| 354 |
return state
|
| 355 |
|
|
@@ -445,7 +448,7 @@ def loop_or_not(state):
|
|
| 445 |
print(f"(line 417) Loop? {state['loop_again']}")
|
| 446 |
if state["loop_again"] == "loop_again":
|
| 447 |
return True
|
| 448 |
-
elif
|
| 449 |
return 'lets_get_outta_here'
|
| 450 |
else:
|
| 451 |
return False
|
|
|
|
| 349 |
query_task = state["query_task"]
|
| 350 |
tool_choice = state["tool_choice"]
|
| 351 |
|
| 352 |
+
if type(tool_choice) != tuple and tool_choice == None:
|
| 353 |
+
state["loop_again"] = "finish_gracefully"
|
| 354 |
+
return state
|
| 355 |
+
elif type(tool_choice) == tuple and (tool_choice[0] == None) and (tool_choice[1] == None):
|
| 356 |
state["loop_again"] = "finish_gracefully"
|
| 357 |
return state
|
| 358 |
|
|
|
|
| 448 |
print(f"(line 417) Loop? {state['loop_again']}")
|
| 449 |
if state["loop_again"] == "loop_again":
|
| 450 |
return True
|
| 451 |
+
elif state["loop_again"] == "finish_gracefully":
|
| 452 |
return 'lets_get_outta_here'
|
| 453 |
else:
|
| 454 |
return False
|