summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/ChatgptAi.py
diff options
context:
space:
mode:
authorTekky <98614666+xtekky@users.noreply.github.com>2023-11-23 22:21:49 +0100
committerGitHub <noreply@github.com>2023-11-23 22:21:49 +0100
commit705ebe73f2ce614830faabf062b2f633e9091cdf (patch)
tree8206e0db5c0cb5e497d444d0deeec86ffb824bd6 /g4f/Provider/ChatgptAi.py
parent~ (diff)
parentFix ChatgptAi Provider (diff)
downloadgpt4free-705ebe73f2ce614830faabf062b2f633e9091cdf.tar
gpt4free-705ebe73f2ce614830faabf062b2f633e9091cdf.tar.gz
gpt4free-705ebe73f2ce614830faabf062b2f633e9091cdf.tar.bz2
gpt4free-705ebe73f2ce614830faabf062b2f633e9091cdf.tar.lz
gpt4free-705ebe73f2ce614830faabf062b2f633e9091cdf.tar.xz
gpt4free-705ebe73f2ce614830faabf062b2f633e9091cdf.tar.zst
gpt4free-705ebe73f2ce614830faabf062b2f633e9091cdf.zip
Diffstat (limited to 'g4f/Provider/ChatgptAi.py')
-rw-r--r--g4f/Provider/ChatgptAi.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/g4f/Provider/ChatgptAi.py b/g4f/Provider/ChatgptAi.py
index 9425dfb0..f2785364 100644
--- a/g4f/Provider/ChatgptAi.py
+++ b/g4f/Provider/ChatgptAi.py
@@ -65,7 +65,8 @@ class ChatgptAi(AsyncGeneratorProvider):
async with session.post(
f"{cls.url}/wp-json/mwai-ui/v1/chats/submit",
proxy=proxy,
- json=data
+ json=data,
+ headers={"X-Wp-Nonce": cls._system["restNonce"]}
) as response:
response.raise_for_status()
async for line in response.content: