diff options
author | Tekky <98614666+xtekky@users.noreply.github.com> | 2023-08-22 16:38:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-22 16:38:12 +0200 |
commit | 847843d120a536e2c80c4402b10f8b93804dc2e1 (patch) | |
tree | af0b2ea883a316d01aae790004222e809f6cc329 /g4f/Provider/ChatgptLogin.py | |
parent | ~ | Merge pull request #828 (diff) | |
parent | change link (diff) | |
download | gpt4free-847843d120a536e2c80c4402b10f8b93804dc2e1.tar gpt4free-847843d120a536e2c80c4402b10f8b93804dc2e1.tar.gz gpt4free-847843d120a536e2c80c4402b10f8b93804dc2e1.tar.bz2 gpt4free-847843d120a536e2c80c4402b10f8b93804dc2e1.tar.lz gpt4free-847843d120a536e2c80c4402b10f8b93804dc2e1.tar.xz gpt4free-847843d120a536e2c80c4402b10f8b93804dc2e1.tar.zst gpt4free-847843d120a536e2c80c4402b10f8b93804dc2e1.zip |
Diffstat (limited to 'g4f/Provider/ChatgptLogin.py')
-rw-r--r-- | g4f/Provider/ChatgptLogin.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/g4f/Provider/ChatgptLogin.py b/g4f/Provider/ChatgptLogin.py index 05bd1262..da9fda40 100644 --- a/g4f/Provider/ChatgptLogin.py +++ b/g4f/Provider/ChatgptLogin.py @@ -9,8 +9,9 @@ from .base_provider import BaseProvider class ChatgptLogin(BaseProvider): - url = "https://chatgptlogin.ac" + url = "https://opchatgpts.net" supports_gpt_35_turbo = True + working = True @staticmethod def create_completion( @@ -24,15 +25,15 @@ class ChatgptLogin(BaseProvider): "accept": "*/*", "accept-language": "en,fr-FR;q=0.9,fr;q=0.8,es-ES;q=0.7,es;q=0.6,en-US;q=0.5,am;q=0.4,de;q=0.3", "content-type": "application/json", - "origin": "https://chatgptlogin.ac", - "referer": "https://chatgptlogin.ac/use-chatgpt-free/", - "sec-ch-ua": '"Not.A/Brand";v="8", "Chromium";v="114", "Google Chrome";v="114"', + "origin": "https://opchatgpts.net", + "referer": "https://opchatgpts.net/chatgpt-free-use/", + "sec-ch-ua": '"Chromium";v="116", "Not)A;Brand";v="24", "Google Chrome";v="116"', "sec-ch-ua-mobile": "?0", "sec-ch-ua-platform": '"Windows"', "sec-fetch-dest": "empty", "sec-fetch-mode": "cors", "sec-fetch-site": "same-origin", - "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36", + "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36", "x-wp-nonce": _get_nonce(), } @@ -59,7 +60,7 @@ class ChatgptLogin(BaseProvider): } response = requests.post( - "https://chatgptlogin.ac/wp-json/ai-chatbot/v1/chat", + "https://opchatgpts.net/wp-json/ai-chatbot/v1/chat", headers=headers, json=json_data, ) @@ -81,9 +82,9 @@ class ChatgptLogin(BaseProvider): def _get_nonce() -> str: res = requests.get( - "https://chatgptlogin.ac/use-chatgpt-free/", + "https://opchatgpts.net/chatgpt-free-use/", headers={ - "Referer": "https://chatgptlogin.ac/use-chatgpt-free/", + "Referer": "https://opchatgpts.net/chatgpt-free-use/", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36", }, ) |