mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-01-03 07:10:11 +01:00
Fix "continue" missing an initial space in chat-instruct/chat modes
This commit is contained in:
parent
c7dd920dc8
commit
655c3e86e3
|
|
@ -880,7 +880,9 @@ def chatbot_wrapper(text, state, regenerate=False, _continue=False, loading_mess
|
||||||
|
|
||||||
# Extract the reply
|
# Extract the reply
|
||||||
if state['mode'] in ['chat', 'chat-instruct']:
|
if state['mode'] in ['chat', 'chat-instruct']:
|
||||||
reply = reply.lstrip()
|
if not _continue:
|
||||||
|
reply = reply.lstrip()
|
||||||
|
|
||||||
if reply.startswith(state['name2'] + ':'):
|
if reply.startswith(state['name2'] + ':'):
|
||||||
reply = reply[len(state['name2'] + ':'):]
|
reply = reply[len(state['name2'] + ':'):]
|
||||||
elif reply.startswith(state['name1'] + ':'):
|
elif reply.startswith(state['name1'] + ':'):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue