XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/gpt4free

Fix issue with You.com and nodriver Show global model list when unselect provider

c9c1aa12
Heiner Lohaus <hlohaus@users.noreply.github.com>
提交于

代码差异

4 个文件 +7 -4
Modified g4f/Provider/needs_auth/Gemini.py +1 -1
@@ -32,7 +32,7 @@ REQUEST_HEADERS = {
32 32 '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',
33 33 'x-same-domain': '1',
34 34 }
35 REQUEST_BL_PARAM = "boq_assistant-bard-web-server_20240201.08_p8"
35 REQUEST_BL_PARAM = "boq_assistant-bard-web-server_20240421.18_p0"
36 36 REQUEST_URL = "https://gemini.google.com/_/BardChatUi/data/assistant.lamda.BardFrontendService/StreamGenerate"
37 37 UPLOAD_IMAGE_URL = "https://content-push.googleapis.com/upload/"
38 38 UPLOAD_IMAGE_HEADERS = {
Modified g4f/Provider/you/har_file.py +1 -1
@@ -101,4 +101,4 @@ async def get_telemetry_ids(proxy: str = None) -> list:
101 101
102 102 return [await get_telemetry_id() for _ in range(1)]
103 103 finally:
104 await browser.stop()
104 await tab.close()
Modified g4f/gui/client/index.html +3 -2
@@ -147,7 +147,7 @@
147 147 </div>
148 148 <div class="field box">
149 149 <label for="OpenaiAccount-api_key" class="label" title="">OpenAI ChatGPT:</label>
150 <textarea id="OpenaiAccount-api_key" name="OpenaiAccount[api_key]" placeholder="access_key"></textarea>
150 <textarea id="OpenaiAccount-api_key" name="OpenaiAccount[api_key]" class="OpenaiChat-api_key" placeholder="access_key"></textarea>
151 151 </div>
152 152 <div class="field box">
153 153 <label for="OpenRouter-api_key" class="label" title="">OpenRouter:</label>
@@ -230,9 +230,10 @@
230 230 <select name="provider" id="provider">
231 231 <option value="">Provider: Auto</option>
232 232 <option value="Bing">Bing</option>
233 <option value="OpenaiChat">OpenaiChat</option>
233 <option value="OpenaiChat">OpenAI ChatGPT</option>
234 234 <option value="Gemini">Gemini</option>
235 235 <option value="Liaobots">Liaobots</option>
236 <option value="MetaAI">Meta AI</option>
236 237 <option value="You">You</option>
237 238 <option value="">----</option>
238 239 </select>
Modified g4f/gui/client/static/js/chat.v1.js +2 -0
@@ -1246,6 +1246,8 @@ async function load_provider_models(providerIndex=null) {
1246 1246 }
1247 1247 const provider = providerSelect.options[providerIndex].value;
1248 1248 if (!provider) {
1249 modelProvider.classList.add("hidden");
1250 modelSelect.classList.remove("hidden");
1249 1251 return;
1250 1252 }
1251 1253 const models = await api('models', provider);