Remove obsolete code
This commit is contained in:
parent
2fde50a800
commit
cc693a7546
1 changed files with 0 additions and 10 deletions
|
@ -323,16 +323,6 @@ def load_history(file, name1, name2):
|
||||||
shared.history['visible'] = j['data_visible']
|
shared.history['visible'] = j['data_visible']
|
||||||
else:
|
else:
|
||||||
shared.history['visible'] = copy.deepcopy(shared.history['internal'])
|
shared.history['visible'] = copy.deepcopy(shared.history['internal'])
|
||||||
# Compatibility with Pygmalion AI's official web UI
|
|
||||||
elif 'chat' in j:
|
|
||||||
shared.history['internal'] = [':'.join(x.split(':')[1:]).strip() for x in j['chat']]
|
|
||||||
if len(j['chat']) > 0 and j['chat'][0].startswith(f'{name2}:'):
|
|
||||||
shared.history['internal'] = [['<|BEGIN-VISIBLE-CHAT|>', shared.history['internal'][0]]] + [[shared.history['internal'][i], shared.history['internal'][i + 1]] for i in range(1, len(shared.history['internal']) - 1, 2)]
|
|
||||||
shared.history['visible'] = copy.deepcopy(shared.history['internal'])
|
|
||||||
shared.history['visible'][0][0] = ''
|
|
||||||
else:
|
|
||||||
shared.history['internal'] = [[shared.history['internal'][i], shared.history['internal'][i + 1]] for i in range(0, len(shared.history['internal']) - 1, 2)]
|
|
||||||
shared.history['visible'] = copy.deepcopy(shared.history['internal'])
|
|
||||||
except:
|
except:
|
||||||
shared.history['internal'] = tokenize_dialogue(file, name1, name2)
|
shared.history['internal'] = tokenize_dialogue(file, name1, name2)
|
||||||
shared.history['visible'] = copy.deepcopy(shared.history['internal'])
|
shared.history['visible'] = copy.deepcopy(shared.history['internal'])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue