Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -78,7 +78,7 @@ def refresh_file_display(state_dict: Dict) -> List[str]:
|
|
| 78 |
|
| 79 |
|
| 80 |
def restart_ui(history: List) -> Tuple[List, Dict, Dict, Dict, Dict]:
|
| 81 |
-
history.
|
| 82 |
return (
|
| 83 |
history,
|
| 84 |
gr.Textbox.update(value="", interactive=False),
|
|
@@ -99,7 +99,7 @@ def bot(state_dict: Dict, history: List) -> List:
|
|
| 99 |
while bot_backend.finish_reason in ('new_input', 'function_call'):
|
| 100 |
if history[-1][0] is None:
|
| 101 |
history.append(
|
| 102 |
-
[
|
| 103 |
)
|
| 104 |
else:
|
| 105 |
history[-1][1] = ""
|
|
|
|
| 78 |
|
| 79 |
|
| 80 |
def restart_ui(history: List) -> Tuple[List, Dict, Dict, Dict, Dict]:
|
| 81 |
+
history.clear()
|
| 82 |
return (
|
| 83 |
history,
|
| 84 |
gr.Textbox.update(value="", interactive=False),
|
|
|
|
| 99 |
while bot_backend.finish_reason in ('new_input', 'function_call'):
|
| 100 |
if history[-1][0] is None:
|
| 101 |
history.append(
|
| 102 |
+
[None, ""]
|
| 103 |
)
|
| 104 |
else:
|
| 105 |
history[-1][1] = ""
|