Merge pull request #1882 from hlohaus/css

Fix issue with You.com and nodriver
This commit is contained in:
H Lohaus 2024-04-23 19:57:43 +02:00 committed by GitHub
commit 431621b274
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 7 additions and 4 deletions

View File

@ -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 = {

View File

@ -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()
await tab.close()

View File

@ -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>

View File

@ -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);