mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-12-24 13:28:59 +01:00
Fix chat saving issue (closes #2863)
This commit is contained in:
parent
21c189112c
commit
75fd763f99
@ -394,7 +394,7 @@ def tokenize_dialogue(dialogue, name1, name2):
|
||||
return history
|
||||
|
||||
|
||||
def save_history(mode, timestamp=False):
|
||||
def save_history(mode, timestamp=False, user_request=False):
|
||||
# Instruct mode histories should not be saved as if
|
||||
# Alpaca or Vicuna were characters
|
||||
if mode == 'instruct':
|
||||
@ -403,7 +403,7 @@ def save_history(mode, timestamp=False):
|
||||
|
||||
fname = f"Instruct_{datetime.now().strftime('%Y%m%d-%H%M%S')}.json"
|
||||
else:
|
||||
if shared.character == 'None':
|
||||
if shared.character == 'None' and not user_request:
|
||||
return
|
||||
|
||||
if timestamp:
|
||||
|
Loading…
Reference in New Issue
Block a user