From f6724a1a01f48c70a0c00cc4b2f85501b1e4f9f1 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Fri, 18 Aug 2023 13:04:45 -0700 Subject: [PATCH] Return the visible history with "Copy last reply" --- modules/chat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/chat.py b/modules/chat.py index ce10e39..312f8cb 100644 --- a/modules/chat.py +++ b/modules/chat.py @@ -317,8 +317,8 @@ def remove_last_message(history): def send_last_reply_to_input(history): - if len(history['internal']) > 0: - return history['internal'][-1][1] + if len(history['visible']) > 0: + return history['visible'][-1][1] else: return ''