From 4333d82b9d935e867ea82ccb7a101a23a5d8a9e6 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Tue, 9 Jan 2024 06:55:18 -0800 Subject: [PATCH] Minor bug fix --- modules/chat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/chat.py b/modules/chat.py index 265d220a..c12a7fd4 100644 --- a/modules/chat.py +++ b/modules/chat.py @@ -527,8 +527,8 @@ def load_history_after_deletion(state, idx): if shared.args.multi_user: return start_new_chat(state) - idx = min(int(idx), len(histories) - 1) histories = find_all_histories(state) + idx = min(int(idx), len(histories) - 1) if len(histories) > 0: history = load_history(histories[idx], state['character_menu'], state['mode'])