summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/bing/conversation.py
diff options
context:
space:
mode:
authorH Lohaus <hlohaus@users.noreply.github.com>2024-02-19 18:33:10 +0100
committerGitHub <noreply@github.com>2024-02-19 18:33:10 +0100
commitf9ad8730ac7e63bcb724dbedfa9f6cab394a0d22 (patch)
treee1cbf1cb6b4e338031c2c72ecc549cd64a0702c5 /g4f/Provider/bing/conversation.py
parentMove GeminiProChat to a new provider #1596 (#1601) (diff)
parentAdd MathJax to GUI #1563, Add model name to GUI #1600 (diff)
downloadgpt4free-f9ad8730ac7e63bcb724dbedfa9f6cab394a0d22.tar
gpt4free-f9ad8730ac7e63bcb724dbedfa9f6cab394a0d22.tar.gz
gpt4free-f9ad8730ac7e63bcb724dbedfa9f6cab394a0d22.tar.bz2
gpt4free-f9ad8730ac7e63bcb724dbedfa9f6cab394a0d22.tar.lz
gpt4free-f9ad8730ac7e63bcb724dbedfa9f6cab394a0d22.tar.xz
gpt4free-f9ad8730ac7e63bcb724dbedfa9f6cab394a0d22.tar.zst
gpt4free-f9ad8730ac7e63bcb724dbedfa9f6cab394a0d22.zip
Diffstat (limited to 'g4f/Provider/bing/conversation.py')
-rw-r--r--g4f/Provider/bing/conversation.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/g4f/Provider/bing/conversation.py b/g4f/Provider/bing/conversation.py
index fb95e241..919d9c1d 100644
--- a/g4f/Provider/bing/conversation.py
+++ b/g4f/Provider/bing/conversation.py
@@ -41,8 +41,11 @@ async def create_conversation(session: ClientSession, proxy: str = None) -> Conv
"sec-fetch-site": "same-origin",
"x-ms-client-request-id": str(uuid.uuid4()),
"x-ms-useragent": "azsdk-js-api-client-factory/1.0.0-beta.1 core-rest-pipeline/1.12.3 OS/Windows",
- "referer": url
+ "referer": url,
+ "Cookie": "; ".join(f"{c.key}={c.value}" for c in session.cookie_jar)
}
+ for k, v in headers.items():
+ session.headers[k] = v
url = 'https://www.bing.com/turing/conversation/create?bundleVersion=1.1579.2'
async with session.get(url, headers=headers, proxy=proxy) as response:
try: