Fix loading session in chat mode
This commit is contained in:
parent
4b6c1d3f08
commit
32c564509e
3 changed files with 22 additions and 8 deletions
|
|
@ -418,6 +418,10 @@ def save_persistent_history(history, character, mode):
|
|||
|
||||
|
||||
def load_persistent_history(state):
|
||||
if shared.session_is_loading:
|
||||
shared.session_is_loading = False
|
||||
return state['history']
|
||||
|
||||
if state['mode'] == 'instruct':
|
||||
return state['history']
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,10 @@ reload_inputs = [] # Parameters for reloading the chat interface
|
|||
# For restarting the interface
|
||||
need_restart = False
|
||||
|
||||
# To prevent the persistent chat history from being loaded when
|
||||
# a session JSON file is being loaded in chat mode
|
||||
session_is_loading = False
|
||||
|
||||
settings = {
|
||||
'dark_theme': True,
|
||||
'autoload_model': False,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue