From ba68db33027692c9b8a4723a752dce23be638d56 Mon Sep 17 00:00:00 2001 From: eminemkun Date: Sat, 16 Dec 2023 22:59:09 +0900 Subject: [PATCH] Fix Bing provider Cookie issue --- g4f/Provider/Bing.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/g4f/Provider/Bing.py b/g4f/Provider/Bing.py index 9e3e7405..af6c5132 100644 --- a/g4f/Provider/Bing.py +++ b/g4f/Provider/Bing.py @@ -439,8 +439,7 @@ async def stream_generate( ): async with ClientSession( timeout=ClientTimeout(total=900), - cookies=cookies, - headers=Defaults.headers, + headers=Defaults.headers if not cookies else {**Defaults.headers, "Cookie": "; ".join(f"{k}={v}" for k, v in cookies.items())}, ) as session: conversation = await create_conversation(session, tone, image, proxy) try: