Merge pull request #1356 from eminemkun/main

Fix Bing provider Cookie issue
This commit is contained in:
H Lohaus 2023-12-16 20:20:26 +01:00 committed by GitHub
commit 5c5ce8c0f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -439,8 +439,7 @@ async def stream_generate(
): ):
async with ClientSession( async with ClientSession(
timeout=ClientTimeout(total=900), timeout=ClientTimeout(total=900),
cookies=cookies, headers=Defaults.headers if not cookies else {**Defaults.headers, "Cookie": "; ".join(f"{k}={v}" for k, v in cookies.items())},
headers=Defaults.headers,
) as session: ) as session:
conversation = await create_conversation(session, tone, image, proxy) conversation = await create_conversation(session, tone, image, proxy)
try: try: