summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/You.py
diff options
context:
space:
mode:
authorHeiner Lohaus <hlohaus@users.noreply.github.com>2024-04-21 07:38:36 +0200
committerHeiner Lohaus <hlohaus@users.noreply.github.com>2024-04-21 07:38:36 +0200
commitf66cd9f8a322edd9cda4551b2a041559c4c82b2a (patch)
treec4d1e9c9eb2ebfe13e2679afe8a23d7ffa45fa46 /g4f/Provider/You.py
parentFix Bing Provider, Add Account Support for Meta AI (diff)
downloadgpt4free-f66cd9f8a322edd9cda4551b2a041559c4c82b2a.tar
gpt4free-f66cd9f8a322edd9cda4551b2a041559c4c82b2a.tar.gz
gpt4free-f66cd9f8a322edd9cda4551b2a041559c4c82b2a.tar.bz2
gpt4free-f66cd9f8a322edd9cda4551b2a041559c4c82b2a.tar.lz
gpt4free-f66cd9f8a322edd9cda4551b2a041559c4c82b2a.tar.xz
gpt4free-f66cd9f8a322edd9cda4551b2a041559c4c82b2a.tar.zst
gpt4free-f66cd9f8a322edd9cda4551b2a041559c4c82b2a.zip
Diffstat (limited to 'g4f/Provider/You.py')
-rw-r--r--g4f/Provider/You.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/g4f/Provider/You.py b/g4f/Provider/You.py
index 36e2d161..e90365ce 100644
--- a/g4f/Provider/You.py
+++ b/g4f/Provider/You.py
@@ -11,6 +11,7 @@ from .helper import format_prompt
from ..image import ImageResponse, to_bytes, is_accepted_format
from ..requests import StreamSession, FormData, raise_for_status
from .you.har_file import get_telemetry_ids
+from .. import debug
class You(AsyncGeneratorProvider, ProviderModelMixin):
url = "https://you.com"
@@ -163,6 +164,9 @@ class You(AsyncGeneratorProvider, ProviderModelMixin):
if not cls._telemetry_ids:
cls._telemetry_ids = await get_telemetry_ids()
user_uuid = str(uuid.uuid4())
+ telemetry_id = cls._telemetry_ids.pop()
+ if debug.logging:
+ print(f"Use telemetry_id: {telemetry_id}")
async with client.post(
"https://web.stytch.com/sdk/v1/passwords",
headers={
@@ -173,7 +177,7 @@ class You(AsyncGeneratorProvider, ProviderModelMixin):
"Referer": "https://you.com/"
},
json={
- "dfp_telemetry_id": cls._telemetry_ids.pop(),
+ "dfp_telemetry_id": telemetry_id,
"email": f"{user_uuid}@gmail.com",
"password": f"{user_uuid}#{user_uuid}",
"session_duration_minutes": 129600