From f4caaf337afda85236e3963c22042e2581597424 Mon Sep 17 00:00:00 2001 From: Hans Raaf Date: Wed, 9 Aug 2023 04:26:28 +0200 Subject: [PATCH] Fix superbooga when using regenerate (#3362) --- extensions/superbooga/script.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extensions/superbooga/script.py b/extensions/superbooga/script.py index 5ef14d9d..475cf1e0 100644 --- a/extensions/superbooga/script.py +++ b/extensions/superbooga/script.py @@ -96,7 +96,8 @@ def apply_settings(chunk_count, chunk_count_initial, time_weight): def custom_generate_chat_prompt(user_input, state, **kwargs): global chat_collector - history = state['history'] + # get history as being modified when using regenerate. + history = kwargs['history'] if state['mode'] == 'instruct': results = collector.get_sorted(user_input, n_results=params['chunk_count'])