Fix Bing provider Cookie issue

This commit is contained in:
eminemkun 2023-12-16 22:59:09 +09:00
parent b615a95a41
commit ba68db3302

View File

@ -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: