mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-21 23:57:58 +01:00
Fix start_with
This commit is contained in:
parent
55457549cd
commit
463ddfffd0
@ -10,6 +10,7 @@ import requests
|
||||
import torch
|
||||
from PIL import Image
|
||||
|
||||
from modules import shared
|
||||
from modules.models import reload_model, unload_model
|
||||
from modules.ui import create_refresh_button
|
||||
|
||||
|
@ -294,12 +294,12 @@ def generate_chat_reply(text, state, regenerate=False, _continue=False, loading_
|
||||
def generate_chat_reply_wrapper(text, start_with, state, regenerate=False, _continue=False):
|
||||
if start_with != '' and not _continue:
|
||||
if regenerate:
|
||||
text = remove_last_message()
|
||||
text, state['history'] = remove_last_message(state['history'])
|
||||
regenerate = False
|
||||
|
||||
_continue = True
|
||||
send_dummy_message(text)
|
||||
send_dummy_reply(start_with)
|
||||
send_dummy_message(text, state)
|
||||
send_dummy_reply(start_with, state)
|
||||
|
||||
for i, history in enumerate(generate_chat_reply(text, state, regenerate, _continue, loading_message=True)):
|
||||
yield chat_html_wrapper(history, state['name1'], state['name2'], state['mode'], state['chat_style']), history
|
||||
|
Loading…
Reference in New Issue
Block a user