Update api / add a synthesize and upload_cookies endpoint (#2406)

* Add web_search function to OpenaiChat provider
* GithubCopilot provider added, it need a api_key
* Remove nodriver login in Gemini synthesize

* Update api / add a synthesize and upload_cookies endpoint
This commit is contained in:
H Lohaus 2024-11-23 00:17:35 +01:00 committed by GitHub
parent e8bd24a25b
commit 431db7b8ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 225 additions and 41 deletions

View file

@ -73,10 +73,9 @@ class Copilot(AbstractProvider):
else:
access_token = conversation.access_token
debug.log(f"Copilot: Access token: {access_token[:7]}...{access_token[-5:]}")
debug.log(f"Copilot: Cookies: {';'.join([*cookies])}")
websocket_url = f"{websocket_url}&accessToken={quote(access_token)}"
headers = {"authorization": f"Bearer {access_token}", "cookie": format_cookies(cookies)}
headers = {"authorization": f"Bearer {access_token}"}
with Session(
timeout=timeout,
proxy=proxy,