From 8cc6000ffbf4e12bf6c1d5e5878d376e36857ec0 Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Fri, 15 Mar 2024 11:46:06 +0100 Subject: Add Pyinstaller support, Use curl_cffi in You provider --- g4f/gui/client/js/chat.v1.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'g4f/gui/client') diff --git a/g4f/gui/client/js/chat.v1.js b/g4f/gui/client/js/chat.v1.js index 24253b2b..c0d0cb6d 100644 --- a/g4f/gui/client/js/chat.v1.js +++ b/g4f/gui/client/js/chat.v1.js @@ -916,16 +916,16 @@ fileInput.addEventListener('change', async (event) => { reader.addEventListener('load', async (event) => { fileInput.dataset.text = event.target.result; if (type == "json") { - const data = JSON.parse(event.target.result); + const data = JSON.parse(fileInput.dataset.text); if ("g4f" in data.options) { Object.keys(data).forEach(key => { if (key != "options" && !localStorage.getItem(key)) { appStorage.setItem(key, JSON.stringify(data[key])); } }); - fileInput.value = ""; delete fileInput.dataset.text; await load_conversations(); + fileInput.value = ""; } } }); -- cgit v1.2.3