From c5cc3a307529fc6a4235d59b0a164e222d457b3b Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Sun, 22 Jan 2023 13:10:36 -0300 Subject: [PATCH] Fix bug in "remove last" button --- server.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server.py b/server.py index 6ebfab87..52cea4fd 100644 --- a/server.py +++ b/server.py @@ -334,10 +334,11 @@ if args.chat or args.cai_chat: def remove_last_message(name1, name2): history.pop() + _history = remove_example_dialogue_from_history(history) if args.cai_chat: - return generate_chat_html(history, name1, name2, character) + return generate_chat_html(_history, name1, name2, character) else: - return history + return _history def clear(): global history