summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/You.py
diff options
context:
space:
mode:
authorHeiner Lohaus <hlohaus@users.noreply.github.com>2024-05-15 21:07:49 +0200
committerHeiner Lohaus <hlohaus@users.noreply.github.com>2024-05-15 21:07:49 +0200
commit24c5502d7601ba3f2c5ab459015c74002b3af5c6 (patch)
treef9a4170ef8c5b0358bc4cf7189f997e3098ee0f3 /g4f/Provider/You.py
parentUpdate README.md (diff)
downloadgpt4free-24c5502d7601ba3f2c5ab459015c74002b3af5c6.tar
gpt4free-24c5502d7601ba3f2c5ab459015c74002b3af5c6.tar.gz
gpt4free-24c5502d7601ba3f2c5ab459015c74002b3af5c6.tar.bz2
gpt4free-24c5502d7601ba3f2c5ab459015c74002b3af5c6.tar.lz
gpt4free-24c5502d7601ba3f2c5ab459015c74002b3af5c6.tar.xz
gpt4free-24c5502d7601ba3f2c5ab459015c74002b3af5c6.tar.zst
gpt4free-24c5502d7601ba3f2c5ab459015c74002b3af5c6.zip
Diffstat (limited to '')
-rw-r--r--g4f/Provider/You.py13
1 files changed, 3 insertions, 10 deletions
diff --git a/g4f/Provider/You.py b/g4f/Provider/You.py
index b4892035..2b08b38a 100644
--- a/g4f/Provider/You.py
+++ b/g4f/Provider/You.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
import re
import json
import base64
@@ -42,7 +44,6 @@ class You(AsyncGeneratorProvider, ProviderModelMixin):
]
model_aliases = {
"claude-v2": "claude-2",
- "gpt-4o": "gpt-4o",
}
_cookies = None
_cookies_used = 0
@@ -185,15 +186,7 @@ class You(AsyncGeneratorProvider, ProviderModelMixin):
@classmethod
async def create_cookies(cls, client: StreamSession) -> Cookies:
if not cls._telemetry_ids:
- try:
- cls._telemetry_ids = await get_telemetry_ids()
- except RuntimeError as e:
- if str(e) == "Event loop is closed":
- if debug.logging:
- print("Event loop is closed error occurred in create_cookies.")
- else:
- raise
-
+ cls._telemetry_ids = await get_telemetry_ids()
user_uuid = str(uuid.uuid4())
telemetry_id = cls._telemetry_ids.pop()
if debug.logging: