summaryrefslogtreecommitdiffstats
path: root/g4f/gui/client/js/chat.v2.js
diff options
context:
space:
mode:
authorabc <98614666+xtekky@users.noreply.github.com>2023-10-10 00:47:58 +0200
committerabc <98614666+xtekky@users.noreply.github.com>2023-10-10 00:47:58 +0200
commite05987ace34b3db38d3849f7c33405bcc7e50ee9 (patch)
tree66259762fb0f2cd5eb470d0bfa9ed5ee03663809 /g4f/gui/client/js/chat.v2.js
parent~ (diff)
downloadgpt4free-e05987ace34b3db38d3849f7c33405bcc7e50ee9.tar
gpt4free-e05987ace34b3db38d3849f7c33405bcc7e50ee9.tar.gz
gpt4free-e05987ace34b3db38d3849f7c33405bcc7e50ee9.tar.bz2
gpt4free-e05987ace34b3db38d3849f7c33405bcc7e50ee9.tar.lz
gpt4free-e05987ace34b3db38d3849f7c33405bcc7e50ee9.tar.xz
gpt4free-e05987ace34b3db38d3849f7c33405bcc7e50ee9.tar.zst
gpt4free-e05987ace34b3db38d3849f7c33405bcc7e50ee9.zip
Diffstat (limited to 'g4f/gui/client/js/chat.v2.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: {