mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-22 08:07:56 +01:00
UI: Fix broken chat histories not showing (closes #6196)
This commit is contained in:
parent
e79e7b90dc
commit
a210e61df1
@ -577,7 +577,7 @@ def find_all_histories_with_first_prompts(state):
|
|||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
|
|
||||||
first_prompt = ""
|
first_prompt = ""
|
||||||
if 'visible' in data and len(data['visible']) > 0:
|
if data and 'visible' in data and len(data['visible']) > 0:
|
||||||
if data['internal'][0][0] == '<|BEGIN-VISIBLE-CHAT|>':
|
if data['internal'][0][0] == '<|BEGIN-VISIBLE-CHAT|>':
|
||||||
if len(data['visible']) > 1:
|
if len(data['visible']) > 1:
|
||||||
first_prompt = html.unescape(data['visible'][1][0])
|
first_prompt = html.unescape(data['visible'][1][0])
|
||||||
|
Loading…
Reference in New Issue
Block a user