mirror of
https://github.com/xtekky/gpt4free.git
synced 2024-09-11 16:55:41 +03:00
ChatGPT Reverse Engineering Update: Adapting to Arkose Detection Changes
This commit is contained in:
parent
7ed49e2315
commit
e34e0fa3f7
@ -406,7 +406,12 @@ class OpenaiChat(AsyncGeneratorProvider, ProviderModelMixin):
|
||||
cls._update_request_args(session)
|
||||
await raise_for_status(response)
|
||||
requirements = await response.json()
|
||||
need_arkose = requirements.get("arkose", {}).get("required")
|
||||
text_data = json.loads(requirements.get("text", "{}"))
|
||||
need_arkose = text_data.get("turnstile", {}).get("required", False)
|
||||
if need_arkose:
|
||||
arkose_token = text_data.get("turnstile", {}).get("dx")
|
||||
else:
|
||||
need_arkose = requirements.get("arkose", {}).get("required", False)
|
||||
chat_token = requirements["token"]
|
||||
|
||||
if need_arkose and arkose_token is None:
|
||||
|
Loading…
Reference in New Issue
Block a user