Fix ChatgptAi Provider

This commit is contained in:
Heiner Lohaus 2023-11-22 21:21:57 +01:00
parent ebb6427100
commit 4cec1ed9aa

View File

@ -65,7 +65,8 @@ class ChatgptAi(AsyncGeneratorProvider):
async with session.post( async with session.post(
f"{cls.url}/wp-json/mwai-ui/v1/chats/submit", f"{cls.url}/wp-json/mwai-ui/v1/chats/submit",
proxy=proxy, proxy=proxy,
json=data json=data,
headers={"X-Wp-Nonce": cls._system["restNonce"]}
) as response: ) as response:
response.raise_for_status() response.raise_for_status()
async for line in response.content: async for line in response.content: