Minor bug fix

This commit is contained in:
oobabooga 2024-01-09 06:55:18 -08:00
parent fbce30b09f
commit 4333d82b9d

View File

@ -527,8 +527,8 @@ def load_history_after_deletion(state, idx):
if shared.args.multi_user: if shared.args.multi_user:
return start_new_chat(state) return start_new_chat(state)
idx = min(int(idx), len(histories) - 1)
histories = find_all_histories(state) histories = find_all_histories(state)
idx = min(int(idx), len(histories) - 1)
if len(histories) > 0: if len(histories) > 0:
history = load_history(histories[idx], state['character_menu'], state['mode']) history = load_history(histories[idx], state['character_menu'], state['mode'])