summaryrefslogtreecommitdiffstats
path: root/g4f/gui/client/js
diff options
context:
space:
mode:
authorCommenter123321 <36051603+Commenter123321@users.noreply.github.com>2023-10-10 14:15:12 +0200
committerCommenter123321 <36051603+Commenter123321@users.noreply.github.com>2023-10-10 14:15:12 +0200
commit0e4297494dd46533738f786e4ac675541586177a (patch)
tree6c2999e14ed831f7f37cc60991571cd040772918 /g4f/gui/client/js
parentadd cool testing for gpt-3.5 and and gpt-4 (diff)
parentUpdate Aivvm.py (diff)
downloadgpt4free-0e4297494dd46533738f786e4ac675541586177a.tar
gpt4free-0e4297494dd46533738f786e4ac675541586177a.tar.gz
gpt4free-0e4297494dd46533738f786e4ac675541586177a.tar.bz2
gpt4free-0e4297494dd46533738f786e4ac675541586177a.tar.lz
gpt4free-0e4297494dd46533738f786e4ac675541586177a.tar.xz
gpt4free-0e4297494dd46533738f786e4ac675541586177a.tar.zst
gpt4free-0e4297494dd46533738f786e4ac675541586177a.zip
Diffstat (limited to 'g4f/gui/client/js')
-rw-r--r--g4f/gui/client/js/chat.v2.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/g4f/gui/client/js/chat.v2.js b/g4f/gui/client/js/chat.v2.js
index df827030..e1faa6bb 100644
--- a/g4f/gui/client/js/chat.v2.js
+++ b/g4f/gui/client/js/chat.v2.js
@@ -52,7 +52,7 @@ const remove_cancel_button = async () => {
const ask_gpt = async (message) => {
try {
- message_input.value = ``;
+ message_input.value = ``;
message_input.innerHTML = ``;
message_input.innerText = ``;
@@ -60,10 +60,11 @@ const ask_gpt = async (message) => {
window.scrollTo(0, 0);
window.controller = new AbortController();
- jailbreak = document.getElementById("jailbreak");
- model = document.getElementById("model");
- prompt_lock = true;
- window.text = ``;
+ jailbreak = document.getElementById("jailbreak");
+ provider = document.getElementById("provider");
+ model = document.getElementById("model");
+ prompt_lock = true;
+ window.text = ``;
window.token = message_id();
stop_generating.classList.remove(`stop_generating-hidden`);
@@ -109,12 +110,15 @@ const ask_gpt = async (message) => {
headers: {
"content-type": `application/json`,
accept: `text/event-stream`,
+ // v: `1.0.0`,
+ // ts: Date.now().toString(),
},
body: JSON.stringify({
conversation_id: window.conversation_id,
action: `_ask`,
model: model.options[model.selectedIndex].value,
jailbreak: jailbreak.options[jailbreak.selectedIndex].value,
+ provider: provider.options[provider.selectedIndex].value,
meta: {
id: window.token,
content: {