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 16:48:56 +0200
committerabc <98614666+xtekky@users.noreply.github.com>2023-10-10 16:48:56 +0200
commit8964d15dc36338e994285552e2b49435428ca50b (patch)
tree2f00422465fa11367df09a71c9fa7f19a1383aa2 /g4f/gui/client/js/chat.v2.js
parent~ (diff)
downloadgpt4free-0.1.5.8.tar
gpt4free-0.1.5.8.tar.gz
gpt4free-0.1.5.8.tar.bz2
gpt4free-0.1.5.8.tar.lz
gpt4free-0.1.5.8.tar.xz
gpt4free-0.1.5.8.tar.zst
gpt4free-0.1.5.8.zip
Diffstat (limited to 'g4f/gui/client/js/chat.v2.js')
-rw-r--r--g4f/gui/client/js/chat.v2.js11
1 files changed, 1 insertions, 10 deletions
diff --git a/g4f/gui/client/js/chat.v2.js b/g4f/gui/client/js/chat.v2.js
index 24f2e45b..f052b7e6 100644
--- a/g4f/gui/client/js/chat.v2.js
+++ b/g4f/gui/client/js/chat.v2.js
@@ -144,10 +144,6 @@ const ask_gpt = async (message) => {
chunk = new TextDecoder().decode(value);
- if (chunk.includes('<form id="challenge-form" action="/backend-api/v2/conversation?"')) {
- chunk = `cloudflare token expired, please refresh the page.`;
- }
-
text += chunk;
document.getElementById(`gpt_${window.token}`).innerHTML =
@@ -160,12 +156,7 @@ const ask_gpt = async (message) => {
message_box.scrollTo({ top: message_box.scrollHeight, behavior: "auto" });
}
- // if text contains :
- if (text.includes("instead. Maintaining this website and API costs a lot of money")) {
- document.getElementById(`gpt_${window.token}`).innerHTML = "An error occured, please reload / refresh cache and try again or use a differnet browser";
- }
-
- if (text.includes(`anerroroccuredmf`)) {
+ if (text.includes(`G4F_ERROR`)) {
document.getElementById(`gpt_${window.token}`).innerHTML = "An error occured, please try again, if the problem persists, please reload / refresh cache or use a differnet browser";
}