summaryrefslogtreecommitdiffstats
path: root/g4f
diff options
context:
space:
mode:
authorBagus Indrayana <bagusindrayanaindo@gmail.com>2023-08-20 17:35:16 +0200
committerBagus Indrayana <bagusindrayanaindo@gmail.com>2023-08-20 17:35:16 +0200
commitee1eaa0923d0facd1500fb198c891532679e69bc (patch)
treef55f05d9b1d0d613c79d740c373595b9f6262467 /g4f
parent ~ | v.0.0.2.2 (diff)
downloadgpt4free-ee1eaa0923d0facd1500fb198c891532679e69bc.tar
gpt4free-ee1eaa0923d0facd1500fb198c891532679e69bc.tar.gz
gpt4free-ee1eaa0923d0facd1500fb198c891532679e69bc.tar.bz2
gpt4free-ee1eaa0923d0facd1500fb198c891532679e69bc.tar.lz
gpt4free-ee1eaa0923d0facd1500fb198c891532679e69bc.tar.xz
gpt4free-ee1eaa0923d0facd1500fb198c891532679e69bc.tar.zst
gpt4free-ee1eaa0923d0facd1500fb198c891532679e69bc.zip
Diffstat (limited to 'g4f')
-rw-r--r--g4f/Provider/ChatgptLogin.py17
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",
},
)