summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorabc <98614666+xtekky@users.noreply.github.com>2024-04-15 11:31:36 +0200
committerabc <98614666+xtekky@users.noreply.github.com>2024-04-15 11:31:36 +0200
commitfdbb4741514e95176d73689ac3dfb45a8284043b (patch)
treea41127338722c53a50433a6c00396bc896f52ca0
parentMerge pull request #1836 from mm3b/main (diff)
downloadgpt4free-fdbb4741514e95176d73689ac3dfb45a8284043b.tar
gpt4free-fdbb4741514e95176d73689ac3dfb45a8284043b.tar.gz
gpt4free-fdbb4741514e95176d73689ac3dfb45a8284043b.tar.bz2
gpt4free-fdbb4741514e95176d73689ac3dfb45a8284043b.tar.lz
gpt4free-fdbb4741514e95176d73689ac3dfb45a8284043b.tar.xz
gpt4free-fdbb4741514e95176d73689ac3dfb45a8284043b.tar.zst
gpt4free-fdbb4741514e95176d73689ac3dfb45a8284043b.zip
-rw-r--r--.gitignore1
-rw-r--r--g4f/Provider/needs_auth/OpenaiChat.py5
-rw-r--r--g4f/Provider/you/har_file.py3
3 files changed, 9 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 7f42f038..c9c5bc95 100644
--- a/.gitignore
+++ b/.gitignore
@@ -63,3 +63,4 @@ dist.py
x.txt
bench.py
to-reverse.txt
+g4f/Provider/OpenaiChat2.py \ No newline at end of file
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)
diff --git a/g4f/Provider/you/har_file.py b/g4f/Provider/you/har_file.py
index 2bb59840..a6981296 100644
--- a/g4f/Provider/you/har_file.py
+++ b/g4f/Provider/you/har_file.py
@@ -149,4 +149,7 @@ async def telemetry_id_with_driver(proxy: str = None):
response = requests.post('https://telemetry.stytch.com/submit',
headers=headers, data=payload, proxies=proxies)
+ if '-' in response.text:
+ print(f'telemetry generated: {response.text}')
+
return (response.text)