mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-12-25 13:58:56 +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
|
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
|
# Instruct mode histories should not be saved as if
|
||||||
# Alpaca or Vicuna were characters
|
# Alpaca or Vicuna were characters
|
||||||
if mode == 'instruct':
|
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"
|
fname = f"Instruct_{datetime.now().strftime('%Y%m%d-%H%M%S')}.json"
|
||||||
else:
|
else:
|
||||||
if shared.character == 'None':
|
if shared.character == 'None' and not user_request:
|
||||||
return
|
return
|
||||||
|
|
||||||
if timestamp:
|
if timestamp:
|
||||||
|
Loading…
Reference in New Issue
Block a user