diff options
author | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2024-03-14 13:53:57 +0100 |
---|---|---|
committer | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2024-03-14 13:53:57 +0100 |
commit | 993c9498c4276836864b01f66f5d08676a994520 (patch) | |
tree | 9d0c3e2544669e09aacdcf635fec9095270c08bd /g4f/gui/client | |
parent | Add model preselection in gui (diff) | |
download | gpt4free-993c9498c4276836864b01f66f5d08676a994520.tar gpt4free-993c9498c4276836864b01f66f5d08676a994520.tar.gz gpt4free-993c9498c4276836864b01f66f5d08676a994520.tar.bz2 gpt4free-993c9498c4276836864b01f66f5d08676a994520.tar.lz gpt4free-993c9498c4276836864b01f66f5d08676a994520.tar.xz gpt4free-993c9498c4276836864b01f66f5d08676a994520.tar.zst gpt4free-993c9498c4276836864b01f66f5d08676a994520.zip |
Diffstat (limited to '')
-rw-r--r-- | g4f/gui/client/html/index.html | 3 | ||||
-rw-r--r-- | g4f/gui/client/js/chat.v1.js | 11 |
2 files changed, 5 insertions, 9 deletions
diff --git a/g4f/gui/client/html/index.html b/g4f/gui/client/html/index.html index e0091c8c..eeebce80 100644 --- a/g4f/gui/client/html/index.html +++ b/g4f/gui/client/html/index.html @@ -161,10 +161,7 @@ <option value="gemini-pro">gemini-pro</option> <option value="">----</option> </select> - </div> - <div class="field"> <select name="model2" id="model2" class="hidden"> - </select> </div> <div class="field"> <select name="jailbreak" id="jailbreak" style="display: none;"> diff --git a/g4f/gui/client/js/chat.v1.js b/g4f/gui/client/js/chat.v1.js index 4e01593d..c90a594d 100644 --- a/g4f/gui/client/js/chat.v1.js +++ b/g4f/gui/client/js/chat.v1.js @@ -16,9 +16,12 @@ const providerSelect = document.getElementById("provider"); const modelSelect = document.getElementById("model"); const modelProvider = document.getElementById("model2"); const systemPrompt = document.getElementById("systemPrompt") +const jailbreak = document.getElementById("jailbreak"); let prompt_lock = false; +const options = ["switch", "model", "model2", "jailbreak", "patch", "provider", "history"]; + hljs.addPlugin(new CopyButtonPlugin()); messageInput.addEventListener("blur", () => { @@ -207,9 +210,7 @@ const ask_gpt = async () => { window.scrollTo(0, 0); window.controller = new AbortController(); - - jailbreak = document.getElementById("jailbreak"); - window.text = ''; + window.text = ""; stop_generating.classList.remove(`stop_generating-hidden`); @@ -246,7 +247,7 @@ const ask_gpt = async () => { id: window.token, conversation_id: window.conversation_id, model: get_selected_model(), - jailbreak: jailbreak.options[jailbreak.selectedIndex].value, + jailbreak: jailbreak?.options[jailbreak.selectedIndex].value, web_search: document.getElementById(`switch`).checked, provider: providerSelect.options[providerSelect.selectedIndex].value, patch_provider: document.getElementById('patch')?.checked, @@ -670,8 +671,6 @@ sidebar_button.addEventListener("click", (event) => { window.scrollTo(0, 0); }); -const options = ["switch", "model", "model2", "jailbreak", "patch", "provider", "history"]; - const register_settings_localstorage = async () => { options.forEach((id) => { element = document.getElementById(id); |