From 5cbbe2fd3d2ec37d990c33f2d72018e526936c6f Mon Sep 17 00:00:00 2001 From: hlohaus <983577+hlohaus@users.noreply.github.com> Date: Mon, 24 Feb 2025 08:53:43 +0100 Subject: Fix model and provider in chat completion response Add login button to HuggingFace demo Custom conversation ids in chat ui Remove rate limiter in demo mode Improve YouTube support in Gemini --- g4f/gui/client/demo.html | 49 +++++++++++++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 17 deletions(-) (limited to 'g4f/gui/client/demo.html') diff --git a/g4f/gui/client/demo.html b/g4f/gui/client/demo.html index 1d75135f..36c2afed 100644 --- a/g4f/gui/client/demo.html +++ b/g4f/gui/client/demo.html @@ -183,25 +183,10 @@ const isIframe = window.self !== window.top; const backendUrl = "{{backend_url}}"; let url = new URL(window.location.href) - let params = new URLSearchParams(url.search); if (isIframe && backendUrl) { - if (params.get("get_gpu_token")) { - window.addEventListener('DOMContentLoaded', async function() { - const link = document.getElementById("new_window"); - link.href = `${backendUrl}${url.search}`; - link.click(); - }); - } else { - window.location.replace(`${backendUrl}${url.search}`); - } + window.location.replace(`${backendUrl}${url.search}`); return; } - if (params.get("__sign")) { - localStorage.setItem("HuggingSpace-api_key", params.get("__sign")); - if (!isIframe) { - window.location.replace("/"); - } - } })(); @@ -240,10 +225,13 @@

Get Access Token

+ + -- cgit v1.2.3