From 1d00be5b918abf5608efcece912fa00e0c2a78bd Mon Sep 17 00:00:00 2001 From: hlohaus <983577+hlohaus@users.noreply.github.com> Date: Tue, 4 Feb 2025 16:25:51 +0100 Subject: Fix api_key in HuggingFace provider Split PollinationsAI provider in two provider Update model list in CablyAI Return backup url, if copy images failed Update url for logging in UI --- g4f/gui/client/static/js/chat.v1.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'g4f/gui/client') diff --git a/g4f/gui/client/static/js/chat.v1.js b/g4f/gui/client/static/js/chat.v1.js index 81706005..8233d13d 100644 --- a/g4f/gui/client/static/js/chat.v1.js +++ b/g4f/gui/client/static/js/chat.v1.js @@ -1959,7 +1959,7 @@ async function on_api() { messageInput.addEventListener("keydown", async (evt) => { if (prompt_lock) return; // If not mobile and not shift enter - let do_enter = messageInput.value.endsWith("\n\n"); + let do_enter = messageInput.value.endsWith("\n\n\n\n"); if (do_enter || !window.matchMedia("(pointer:coarse)").matches && evt.keyCode === 13 && !evt.shiftKey) { evt.preventDefault(); console.log("pressed enter"); @@ -2447,11 +2447,11 @@ async function api(ressource, args=null, files=null, message_id=null, scroll=tru return; } } else if (args) { - if (ressource == "log") { - if (!document.getElementById("report_error").checked) { + if (ressource in ("log", "usage")) { + if (ressource == "log" && !document.getElementById("report_error").checked) { return; } - url = `https://roxky-g4f-demo.hf.space${url}`; + url = `https://roxky-g4f-backup.hf.space${url}`; } headers['content-type'] = 'application/json'; response = await fetch(url, { -- cgit v1.2.3