From 2ed0386d87fd649a848f17cdd87e2bd650895114 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Sat, 11 Feb 2023 07:59:54 -0300 Subject: [PATCH] Fix replace last reply in --chat mode (for #69) --- server.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server.py b/server.py index 30b5903..e5df305 100644 --- a/server.py +++ b/server.py @@ -537,7 +537,10 @@ def send_last_reply_to_input(): def replace_last_reply(text, name1, name2): if len(history['visible']) > 0: - history['visible'][-1][1] = text + if args.cai_chat: + history['visible'][-1][1] = text + else: + history['visible'][-1] = (history['visible'][-1][0], text) history['internal'][-1][1] = apply_extensions(text, "input") if args.cai_chat: