summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH Lohaus <hlohaus@users.noreply.github.com>2024-04-23 19:57:43 +0200
committerGitHub <noreply@github.com>2024-04-23 19:57:43 +0200
commit431621b2747ce62d46c1af53e72d457b46b1c3b1 (patch)
treee681d6919241cd10406643e12c48d3960b5f52eb
parentMerge pull request #1881 from hlohaus/css (diff)
parentFix issue with You.com and nodriver (diff)
downloadgpt4free-0.3.0.6.tar
gpt4free-0.3.0.6.tar.gz
gpt4free-0.3.0.6.tar.bz2
gpt4free-0.3.0.6.tar.lz
gpt4free-0.3.0.6.tar.xz
gpt4free-0.3.0.6.tar.zst
gpt4free-0.3.0.6.zip
-rw-r--r--g4f/Provider/needs_auth/Gemini.py2
-rw-r--r--g4f/Provider/you/har_file.py2
-rw-r--r--g4f/gui/client/index.html5
-rw-r--r--g4f/gui/client/static/js/chat.v1.js2
4 files changed, 7 insertions, 4 deletions
diff --git a/g4f/Provider/needs_auth/Gemini.py b/g4f/Provider/needs_auth/Gemini.py
index 209c2e91..02bb0f5a 100644
--- a/g4f/Provider/needs_auth/Gemini.py
+++ b/g4f/Provider/needs_auth/Gemini.py
@@ -32,7 +32,7 @@ REQUEST_HEADERS = {
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36',
'x-same-domain': '1',
}
-REQUEST_BL_PARAM = "boq_assistant-bard-web-server_20240201.08_p8"
+REQUEST_BL_PARAM = "boq_assistant-bard-web-server_20240421.18_p0"
REQUEST_URL = "https://gemini.google.com/_/BardChatUi/data/assistant.lamda.BardFrontendService/StreamGenerate"
UPLOAD_IMAGE_URL = "https://content-push.googleapis.com/upload/"
UPLOAD_IMAGE_HEADERS = {
diff --git a/g4f/Provider/you/har_file.py b/g4f/Provider/you/har_file.py
index e58e44d6..791db7f1 100644
--- a/g4f/Provider/you/har_file.py
+++ b/g4f/Provider/you/har_file.py
@@ -101,4 +101,4 @@ async def get_telemetry_ids(proxy: str = None) -> list:
return [await get_telemetry_id() for _ in range(1)]
finally:
- await browser.stop() \ No newline at end of file
+ await tab.close() \ No newline at end of file
diff --git a/g4f/gui/client/index.html b/g4f/gui/client/index.html
index cfca51a9..66bcaaab 100644
--- a/g4f/gui/client/index.html
+++ b/g4f/gui/client/index.html
@@ -147,7 +147,7 @@
</div>
<div class="field box">
<label for="OpenaiAccount-api_key" class="label" title="">OpenAI ChatGPT:</label>
- <textarea id="OpenaiAccount-api_key" name="OpenaiAccount[api_key]" placeholder="access_key"></textarea>
+ <textarea id="OpenaiAccount-api_key" name="OpenaiAccount[api_key]" class="OpenaiChat-api_key" placeholder="access_key"></textarea>
</div>
<div class="field box">
<label for="OpenRouter-api_key" class="label" title="">OpenRouter:</label>
@@ -230,9 +230,10 @@
<select name="provider" id="provider">
<option value="">Provider: Auto</option>
<option value="Bing">Bing</option>
- <option value="OpenaiChat">OpenaiChat</option>
+ <option value="OpenaiChat">OpenAI ChatGPT</option>
<option value="Gemini">Gemini</option>
<option value="Liaobots">Liaobots</option>
+ <option value="MetaAI">Meta AI</option>
<option value="You">You</option>
<option value="">----</option>
</select>
diff --git a/g4f/gui/client/static/js/chat.v1.js b/g4f/gui/client/static/js/chat.v1.js
index d5988c26..23605ed4 100644
--- a/g4f/gui/client/static/js/chat.v1.js
+++ b/g4f/gui/client/static/js/chat.v1.js
@@ -1246,6 +1246,8 @@ async function load_provider_models(providerIndex=null) {
}
const provider = providerSelect.options[providerIndex].value;
if (!provider) {
+ modelProvider.classList.add("hidden");
+ modelSelect.classList.remove("hidden");
return;
}
const models = await api('models', provider);