Fix Continue in chat mode

This commit is contained in:
oobabooga 2023-04-11 21:46:17 -03:00
parent f2ec880e81
commit 37d52c96bc

View File

@ -139,10 +139,11 @@ def chatbot_wrapper(text, state, regenerate=False, _continue=False):
text = apply_extensions(text, "input") text = apply_extensions(text, "input")
# Generating the prompt # Generating the prompt
kwargs = {'_continue': _continue}
if custom_generate_chat_prompt is None: if custom_generate_chat_prompt is None:
prompt = generate_chat_prompt(text, state) prompt = generate_chat_prompt(text, state, **kwargs)
else: else:
prompt = custom_generate_chat_prompt(text, state) prompt = custom_generate_chat_prompt(text, state, **kwargs)
# Yield *Is typing...* # Yield *Is typing...*
if not any((regenerate, _continue)): if not any((regenerate, _continue)):