summaryrefslogtreecommitdiffstats
path: root/g4f/gui/client/js
diff options
context:
space:
mode:
authorH Lohaus <hlohaus@users.noreply.github.com>2023-12-07 07:18:05 +0100
committerGitHub <noreply@github.com>2023-12-07 07:18:05 +0100
commit484b96d850aca9b9144f3b8dd2fb502b25356c22 (patch)
treeb10fe200193cfdbe0ee25714df49959c01c6265f /g4f/gui/client/js
parentUpdate Pi.py (diff)
downloadgpt4free-484b96d850aca9b9144f3b8dd2fb502b25356c22.tar
gpt4free-484b96d850aca9b9144f3b8dd2fb502b25356c22.tar.gz
gpt4free-484b96d850aca9b9144f3b8dd2fb502b25356c22.tar.bz2
gpt4free-484b96d850aca9b9144f3b8dd2fb502b25356c22.tar.lz
gpt4free-484b96d850aca9b9144f3b8dd2fb502b25356c22.tar.xz
gpt4free-484b96d850aca9b9144f3b8dd2fb502b25356c22.tar.zst
gpt4free-484b96d850aca9b9144f3b8dd2fb502b25356c22.zip
Diffstat (limited to 'g4f/gui/client/js')
-rw-r--r--g4f/gui/client/js/chat.v1.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/g4f/gui/client/js/chat.v1.js b/g4f/gui/client/js/chat.v1.js
index 2844b73e..2a1bdd73 100644
--- a/g4f/gui/client/js/chat.v1.js
+++ b/g4f/gui/client/js/chat.v1.js
@@ -628,4 +628,19 @@ observer.observe(message_input, { attributes: true });
option.value = option.text = provider;
select.appendChild(option);
}
+})();
+
+(async () => {
+ response = await fetch('/backend-api/v2/version')
+ versions = await response.json()
+
+ document.title = 'g4f - gui - ' + versions["version"];
+ text = "version ~ "
+ if (versions["version"] != versions["lastet_version"]) {
+ release_url = 'https://github.com/xtekky/gpt4free/releases/tag/' + versions["lastet_version"];
+ text += '<a href="' + release_url +'" target="_blank" title="New version: ' + versions["lastet_version"] +'">' + versions["version"] + ' 🆕</a>';
+ } else {
+ text += versions["version"];
+ }
+ document.getElementById("version_text").innerHTML = text
})(); \ No newline at end of file