From 431db7b8ea36667fe5dc4f7e4e5b740c6e8450e7 Mon Sep 17 00:00:00 2001 From: H Lohaus Date: Sat, 23 Nov 2024 00:17:35 +0100 Subject: 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 --- g4f/Provider/Copilot.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'g4f/Provider/Copilot.py') diff --git a/g4f/Provider/Copilot.py b/g4f/Provider/Copilot.py index e10a55e8..2f37b1eb 100644 --- a/g4f/Provider/Copilot.py +++ b/g4f/Provider/Copilot.py @@ -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, -- cgit v1.2.3