mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-26 01:30:20 +01:00
Fix chat history handling in instruct mode
This commit is contained in:
parent
79ac94cc2f
commit
68dcbc7ebd
@ -319,12 +319,13 @@ def clear_chat_log(name1, name2, greeting, mode, style):
|
||||
shared.history['visible'] = []
|
||||
shared.history['internal'] = []
|
||||
|
||||
if greeting != '':
|
||||
shared.history['internal'] += [['<|BEGIN-VISIBLE-CHAT|>', greeting]]
|
||||
shared.history['visible'] += [['', apply_extensions("output", greeting)]]
|
||||
if mode != 'instruct':
|
||||
if greeting != '':
|
||||
shared.history['internal'] += [['<|BEGIN-VISIBLE-CHAT|>', greeting]]
|
||||
shared.history['visible'] += [['', apply_extensions("output", greeting)]]
|
||||
|
||||
save_history(mode)
|
||||
|
||||
# Save cleared logs
|
||||
save_history(mode)
|
||||
return chat_html_wrapper(shared.history['visible'], name1, name2, mode, style)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user