mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-10-01 01:26:03 -04:00
Better handle <USER>
This commit is contained in:
parent
145c725c39
commit
c855b828fe
@ -127,8 +127,8 @@ def chatbot_wrapper(text, max_new_tokens, do_sample, temperature, top_p, typical
|
||||
|
||||
# Extracting the reply
|
||||
reply, next_character_found, substring_found = extract_message_from_reply(prompt, reply, name1, name2, check)
|
||||
reply = re.sub("(<USER>|<user>|{{user}})", name1_original, reply)
|
||||
visible_reply = apply_extensions(reply, "output")
|
||||
visible_reply = re.sub("(<USER>|<user>|{{user}})", name1_original, reply)
|
||||
visible_reply = apply_extensions(visible_reply, "output")
|
||||
if shared.args.chat:
|
||||
visible_reply = visible_reply.replace('\n', '<br>')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user