Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -641,10 +641,9 @@ if len(chat_history) > max_history_pairs:
|
|
641 |
chat_history = chat_history[-max_history_pairs:]
|
642 |
# print(f"History truncated. Keeping last {len(chat_history)} turns.") # Debug print
|
643 |
|
644 |
-
|
645 |
# Return the updated history state
|
646 |
-
# This return statement
|
647 |
-
return "", chat_history # Return empty string for the input box, and the updated history
|
648 |
|
649 |
# --- Gradio Interface ---
|
650 |
|
|
|
641 |
chat_history = chat_history[-max_history_pairs:]
|
642 |
# print(f"History truncated. Keeping last {len(chat_history)} turns.") # Debug print
|
643 |
|
|
|
644 |
# Return the updated history state
|
645 |
+
# This return statement MUST be inside the respond function definition
|
646 |
+
return "", chat_history # Return empty string for the input box, and the updated history
|
647 |
|
648 |
# --- Gradio Interface ---
|
649 |
|