diff options
author | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2024-02-11 08:29:23 +0100 |
---|---|---|
committer | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2024-02-11 08:29:23 +0100 |
commit | 76ec2064adab572de46a2d11ef0a5e38ef181295 (patch) | |
tree | 8a19ec5c7acf4f6cf4c1f4d030e2434f6f3dc46b /g4f/gui | |
parent | Fix select chat mode, fix auth value in You (diff) | |
download | gpt4free-76ec2064adab572de46a2d11ef0a5e38ef181295.tar gpt4free-76ec2064adab572de46a2d11ef0a5e38ef181295.tar.gz gpt4free-76ec2064adab572de46a2d11ef0a5e38ef181295.tar.bz2 gpt4free-76ec2064adab572de46a2d11ef0a5e38ef181295.tar.lz gpt4free-76ec2064adab572de46a2d11ef0a5e38ef181295.tar.xz gpt4free-76ec2064adab572de46a2d11ef0a5e38ef181295.tar.zst gpt4free-76ec2064adab572de46a2d11ef0a5e38ef181295.zip |
Diffstat (limited to '')
-rw-r--r-- | g4f/gui/client/html/index.html | 9 | ||||
-rw-r--r-- | g4f/gui/client/js/chat.v1.js | 9 |
2 files changed, 14 insertions, 4 deletions
diff --git a/g4f/gui/client/html/index.html b/g4f/gui/client/html/index.html index d91e9b77..70b8c75f 100644 --- a/g4f/gui/client/html/index.html +++ b/g4f/gui/client/html/index.html @@ -168,14 +168,19 @@ </div> <div class="field"> <input type="checkbox" id="switch" /> - <label for="switch"></label> + <label for="switch" title="Add the pages of the first 5 search results to the query."></label> <span class="about">Web Access</span> </div> <div class="field"> <input type="checkbox" id="patch" /> - <label for="patch" title="Works only with Bing and some other providers"></label> + <label for="patch" title="Enable create images with Bing."></label> <span class="about">Image Generator</span> </div> + <div class="field"> + <input type="checkbox" id="history" /> + <label for="history" title="To improve the reaction time or if you have trouble with large conversations."></label> + <span class="about">Disable History</span> + </div> </div> </div> </div> diff --git a/g4f/gui/client/js/chat.v1.js b/g4f/gui/client/js/chat.v1.js index a925572a..a243b1de 100644 --- a/g4f/gui/client/js/chat.v1.js +++ b/g4f/gui/client/js/chat.v1.js @@ -100,6 +100,11 @@ const ask_gpt = async () => { delete messages[i]["provider"]; } + // Remove history, if it is selected + if (document.getElementById('history')?.checked) { + messages = [messages[messages.length-1]] + } + window.scrollTo(0, 0); window.controller = new AbortController(); @@ -491,7 +496,7 @@ document.querySelector(".mobile-sidebar").addEventListener("click", (event) => { }); const register_settings_localstorage = async () => { - for (id of ["switch", "model", "jailbreak", "patch", "provider"]) { + for (id of ["switch", "model", "jailbreak", "patch", "provider", "history"]) { element = document.getElementById(id); element.addEventListener('change', async (event) => { switch (event.target.type) { @@ -509,7 +514,7 @@ const register_settings_localstorage = async () => { } const load_settings_localstorage = async () => { - for (id of ["switch", "model", "jailbreak", "patch", "provider"]) { + for (id of ["switch", "model", "jailbreak", "patch", "provider", "history"]) { element = document.getElementById(id); value = localStorage.getItem(element.id); if (value) { |