summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/Chatgpt4Online.py
diff options
context:
space:
mode:
authorkqlio67 <kqlio67@users.noreply.github.com>2024-10-20 19:33:14 +0200
committerkqlio67 <kqlio67@users.noreply.github.com>2024-10-20 19:33:14 +0200
commit8f85553a5949d35e9e3a0f0fe77d9d131c825b23 (patch)
treee1a104833fa1f0fa57e3f7c098dd9ab20c79f5c8 /g4f/Provider/Chatgpt4Online.py
parentAdd files via upload (diff)
downloadgpt4free-8f85553a5949d35e9e3a0f0fe77d9d131c825b23.tar
gpt4free-8f85553a5949d35e9e3a0f0fe77d9d131c825b23.tar.gz
gpt4free-8f85553a5949d35e9e3a0f0fe77d9d131c825b23.tar.bz2
gpt4free-8f85553a5949d35e9e3a0f0fe77d9d131c825b23.tar.lz
gpt4free-8f85553a5949d35e9e3a0f0fe77d9d131c825b23.tar.xz
gpt4free-8f85553a5949d35e9e3a0f0fe77d9d131c825b23.tar.zst
gpt4free-8f85553a5949d35e9e3a0f0fe77d9d131c825b23.zip
Diffstat (limited to 'g4f/Provider/Chatgpt4Online.py')
-rw-r--r--g4f/Provider/Chatgpt4Online.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/g4f/Provider/Chatgpt4Online.py b/g4f/Provider/Chatgpt4Online.py
index 74241253..627facf6 100644
--- a/g4f/Provider/Chatgpt4Online.py
+++ b/g4f/Provider/Chatgpt4Online.py
@@ -13,11 +13,14 @@ class Chatgpt4Online(AsyncGeneratorProvider):
api_endpoint = "/wp-json/mwai-ui/v1/chats/submit"
working = True
+ default_model = 'gpt-4'
+ models = [default_model]
+
async def get_nonce(headers: dict) -> str:
async with ClientSession(headers=headers) as session:
async with session.post(f"https://chatgpt4online.org/wp-json/mwai/v1/start_session") as response:
return (await response.json())["restNonce"]
-
+
@classmethod
async def create_async_generator(
cls,