From fdbb4741514e95176d73689ac3dfb45a8284043b Mon Sep 17 00:00:00 2001 From: abc <98614666+xtekky@users.noreply.github.com> Date: Mon, 15 Apr 2024 10:31:36 +0100 Subject: some more logging --- g4f/Provider/needs_auth/OpenaiChat.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'g4f/Provider/needs_auth/OpenaiChat.py') diff --git a/g4f/Provider/needs_auth/OpenaiChat.py b/g4f/Provider/needs_auth/OpenaiChat.py index b3955c35..b34daa3e 100644 --- a/g4f/Provider/needs_auth/OpenaiChat.py +++ b/g4f/Provider/needs_auth/OpenaiChat.py @@ -371,6 +371,8 @@ class OpenaiChat(AsyncGeneratorProvider, ProviderModelMixin): except NoValidHarFileError: ... if cls._api_key is None: + if debug.logging: + print("Getting access token with nodriver.") await cls.nodriver_access_token() cls.default_model = cls.get_model(await cls.get_default_model(session, cls._headers)) @@ -386,6 +388,9 @@ class OpenaiChat(AsyncGeneratorProvider, ProviderModelMixin): blob = data["arkose"]["dx"] need_arkose = data["arkose"]["required"] chat_token = data["token"] + + if debug.logging: + print(f'Arkose: {need_arkose} Turnstile: {data["turnstile"]["required"]}') if need_arkose and arkose_token is None: arkose_token, api_key, cookies = await getArkoseAndAccessToken(proxy) -- cgit v1.2.3