From 8f85553a5949d35e9e3a0f0fe77d9d131c825b23 Mon Sep 17 00:00:00 2001 From: kqlio67 Date: Sun, 20 Oct 2024 20:33:14 +0300 Subject: update g4f/models.py g4f/Provider/Ai4Chat.py g4f/Provider/Chatgpt4Online.py --- g4f/Provider/Chatgpt4Online.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'g4f/Provider/Chatgpt4Online.py') 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, -- cgit v1.2.3