Explorar o código

Fix Continue in chat mode

oobabooga %!s(int64=2) %!d(string=hai) anos
pai
achega
37d52c96bc
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      modules/chat.py

+ 3 - 2
modules/chat.py

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