summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/Bing.py
diff options
context:
space:
mode:
authorH Lohaus <hlohaus@users.noreply.github.com>2023-12-16 20:20:26 +0100
committerGitHub <noreply@github.com>2023-12-16 20:20:26 +0100
commit5c5ce8c0f7caa77c09247a103d67a5a030d70e91 (patch)
tree397fb313cd5b931bad0bab5945eacb33bf14d98c /g4f/Provider/Bing.py
parentMerge pull request #1352 from nullstreak/main (diff)
parentFix Bing provider Cookie issue (diff)
downloadgpt4free-5c5ce8c0f7caa77c09247a103d67a5a030d70e91.tar
gpt4free-5c5ce8c0f7caa77c09247a103d67a5a030d70e91.tar.gz
gpt4free-5c5ce8c0f7caa77c09247a103d67a5a030d70e91.tar.bz2
gpt4free-5c5ce8c0f7caa77c09247a103d67a5a030d70e91.tar.lz
gpt4free-5c5ce8c0f7caa77c09247a103d67a5a030d70e91.tar.xz
gpt4free-5c5ce8c0f7caa77c09247a103d67a5a030d70e91.tar.zst
gpt4free-5c5ce8c0f7caa77c09247a103d67a5a030d70e91.zip
Diffstat (limited to '')
-rw-r--r--g4f/Provider/Bing.py3
1 files changed, 1 insertions, 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: