Add "save defaults to settings.yaml" button (#3574)
This commit is contained in:
parent
a95e6f02cb
commit
619cb4e78b
11 changed files with 82 additions and 52 deletions
|
@ -261,7 +261,7 @@ def chatbot_wrapper(text, state, regenerate=False, _continue=False, loading_mess
|
|||
yield output
|
||||
|
||||
|
||||
def impersonate_wrapper(text, start_with, state):
|
||||
def impersonate_wrapper(text, state):
|
||||
if shared.model_name == 'None' or shared.model is None:
|
||||
logger.error("No model is loaded! Select one in the Model tab.")
|
||||
yield ''
|
||||
|
@ -291,15 +291,15 @@ def generate_chat_reply(text, state, regenerate=False, _continue=False, loading_
|
|||
|
||||
|
||||
# Same as above but returns HTML for the UI
|
||||
def generate_chat_reply_wrapper(text, start_with, state, regenerate=False, _continue=False):
|
||||
if start_with != '' and not _continue:
|
||||
def generate_chat_reply_wrapper(text, state, regenerate=False, _continue=False):
|
||||
if state['start_with'] != '' and not _continue:
|
||||
if regenerate:
|
||||
text, state['history'] = remove_last_message(state['history'])
|
||||
regenerate = False
|
||||
|
||||
_continue = True
|
||||
send_dummy_message(text, state)
|
||||
send_dummy_reply(start_with, state)
|
||||
send_dummy_reply(state['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…
Add table
Add a link
Reference in a new issue