g4f 6.9.5__py3-none-any.whl → 6.9.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- g4f/Provider/PollinationsAI.py +3 -3
- g4f/Provider/Yupp.py +1 -2
- g4f/Provider/needs_auth/Gemini.py +1 -1
- g4f/Provider/needs_auth/LMArena.py +1 -1
- g4f/api/__init__.py +1 -1
- {g4f-6.9.5.dist-info → g4f-6.9.7.dist-info}/METADATA +1 -1
- {g4f-6.9.5.dist-info → g4f-6.9.7.dist-info}/RECORD +11 -11
- {g4f-6.9.5.dist-info → g4f-6.9.7.dist-info}/WHEEL +0 -0
- {g4f-6.9.5.dist-info → g4f-6.9.7.dist-info}/entry_points.txt +0 -0
- {g4f-6.9.5.dist-info → g4f-6.9.7.dist-info}/licenses/LICENSE +0 -0
- {g4f-6.9.5.dist-info → g4f-6.9.7.dist-info}/top_level.txt +0 -0
g4f/Provider/PollinationsAI.py
CHANGED
|
@@ -251,7 +251,7 @@ class PollinationsAI(AsyncGeneratorProvider, ProviderModelMixin):
|
|
|
251
251
|
**kwargs
|
|
252
252
|
) -> AsyncResult:
|
|
253
253
|
if cache is None:
|
|
254
|
-
cache = kwargs.get("action") != "variant"
|
|
254
|
+
cache = kwargs.get("action") is None or kwargs.get("action") != "variant"
|
|
255
255
|
if extra_body is None:
|
|
256
256
|
extra_body = {}
|
|
257
257
|
if not model:
|
|
@@ -483,8 +483,8 @@ class PollinationsAI(AsyncGeneratorProvider, ProviderModelMixin):
|
|
|
483
483
|
headers = None
|
|
484
484
|
if api_key and not api_key.startswith("g4f_") and not api_key.startswith("gfs_"):
|
|
485
485
|
headers = {"authorization": f"Bearer {api_key}"}
|
|
486
|
-
elif cls.balance > 0:
|
|
487
|
-
headers = {"authorization": f"Bearer {
|
|
486
|
+
elif cls.balance and cls.balance > 0:
|
|
487
|
+
headers = {"authorization": f"Bearer {''.join(cls.api_key)}"}
|
|
488
488
|
yield JsonRequest.from_dict(data)
|
|
489
489
|
if headers:
|
|
490
490
|
url = cls.gen_text_api_endpoint
|
g4f/Provider/Yupp.py
CHANGED
|
@@ -11,7 +11,7 @@ try:
|
|
|
11
11
|
import cloudscraper
|
|
12
12
|
from cloudscraper import CloudScraper
|
|
13
13
|
except ImportError:
|
|
14
|
-
|
|
14
|
+
from typing import Type as CloudScraper
|
|
15
15
|
|
|
16
16
|
from .helper import get_last_user_message
|
|
17
17
|
from .yupp.models import YuppModelManager
|
|
@@ -47,7 +47,6 @@ def create_scraper():
|
|
|
47
47
|
scraper.headers.update({
|
|
48
48
|
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36 Edg/137.0.0.0",
|
|
49
49
|
"Accept": "text/x-component, */*",
|
|
50
|
-
"Accept-Encoding": "gzip, deflate, br, zstd",
|
|
51
50
|
"Accept-Language": "en-US,en;q=0.9",
|
|
52
51
|
"Sec-Fetch-Dest": "empty",
|
|
53
52
|
"Sec-Fetch-Mode": "cors",
|
|
@@ -116,7 +116,7 @@ class LMArena(AsyncGeneratorProvider, ProviderModelMixin, AuthFileMixin):
|
|
|
116
116
|
"getProxyImage": "60049198d4936e6b7acc63719b63b89284c58683e6"
|
|
117
117
|
}
|
|
118
118
|
@classmethod
|
|
119
|
-
def get_models(cls, timeout: int = None) -> list[str]:
|
|
119
|
+
def get_models(cls, timeout: int = None, **kwargs) -> list[str]:
|
|
120
120
|
if not cls._models_loaded and has_curl_cffi:
|
|
121
121
|
cache_file = cls.get_cache_file()
|
|
122
122
|
args = {}
|
g4f/api/__init__.py
CHANGED
|
@@ -229,7 +229,7 @@ class Api:
|
|
|
229
229
|
|
|
230
230
|
def register_authorization(self):
|
|
231
231
|
if AppConfig.g4f_api_key:
|
|
232
|
-
print(
|
|
232
|
+
print("Register authentication key:", ''.join(['*' for _ in range(len(AppConfig.g4f_api_key))]))
|
|
233
233
|
if has_crypto:
|
|
234
234
|
private_key, _ = create_or_read_keys()
|
|
235
235
|
session_key = get_session_key()
|
|
@@ -23,7 +23,7 @@ g4f/Provider/Mintlify.py,sha256=3Bvy1oh6scg4xs9pw5RY4mmi8XEvQDelnNp664TefbU,7937
|
|
|
23
23
|
g4f/Provider/OIVSCodeSer.py,sha256=clebON7Ssd9syewh3BWT59XOeB-WORXF6FPOwbzfRmo,1366
|
|
24
24
|
g4f/Provider/OperaAria.py,sha256=sLnTOKzbW9BxTxNmHXJ-YDnhPU6Dj6MBdDfqDh-Zz-c,14662
|
|
25
25
|
g4f/Provider/Perplexity.py,sha256=GUebbVin9hCg4FDei9RX2N6WboFcDDPm061WnnpPRaI,13236
|
|
26
|
-
g4f/Provider/PollinationsAI.py,sha256=
|
|
26
|
+
g4f/Provider/PollinationsAI.py,sha256=lgrwBxYrZOyKSUF7AJu9TA7S3YA1rdbAw08-W94IFwU,21506
|
|
27
27
|
g4f/Provider/PollinationsImage.py,sha256=wdGY9kbPGlqAkyeJcjXgWOG3HLVPU4QK-JENwg3gmwk,2297
|
|
28
28
|
g4f/Provider/Qwen.py,sha256=XPJHRlobijqjdDGVqA-aVyRx2SeM28zSWf-NmzxJtgE,23876
|
|
29
29
|
g4f/Provider/Startnest.py,sha256=OocXEAK3pKG-tC_D_chGE7GD22dZr67J1m7JBhLxniM,9526
|
|
@@ -31,7 +31,7 @@ g4f/Provider/StringableInference.py,sha256=ZohMZrVAn6G82zrYpLTvELkzfds4nxu09lx7w
|
|
|
31
31
|
g4f/Provider/TeachAnything.py,sha256=ST87YdOdxtIc5JMaKzGdVy9J9wlhdhYIchRtXBljIBU,2843
|
|
32
32
|
g4f/Provider/WeWordle.py,sha256=ocKEfMYBKWPzv2WoDntn-WC-DkrSg5b_ipL9VYhTgsw,7007
|
|
33
33
|
g4f/Provider/Yqcloud.py,sha256=xzX-G-Lv0pyOHTypSJdavmbm3GPxnL-wRoT3VmjzUIM,3213
|
|
34
|
-
g4f/Provider/Yupp.py,sha256=
|
|
34
|
+
g4f/Provider/Yupp.py,sha256=flSbW_PDMqdnJU7jCyg1wWmHr-QV3DHIzdlEI5w6-TY,32365
|
|
35
35
|
g4f/Provider/__init__.py,sha256=l6qxw1XlGgFqTTI2Q8YjlP-Yr17viOiPj1eaU8K9LEo,2782
|
|
36
36
|
g4f/Provider/base_provider.py,sha256=lAd80-2hO1kzs9n9TUKv6fR4zHjSdZBqVErpm_gna9o,199
|
|
37
37
|
g4f/Provider/helper.py,sha256=_4fO_b2U8BnpuF6kijUM4SaFbX2Pcz6mksxK9mVXhP4,111
|
|
@@ -71,7 +71,7 @@ g4f/Provider/needs_auth/Custom.py,sha256=bD6ao9IkIG_oW7bYAHCSEZrMEnDX9u2X96q9LkC
|
|
|
71
71
|
g4f/Provider/needs_auth/DeepSeek.py,sha256=XU4SGVEZ7huLNYXve5hKKev2xZn_l9KDSAA7ipOir3Y,471
|
|
72
72
|
g4f/Provider/needs_auth/DeepSeekAPI.py,sha256=UaN4W5b_1nXsyB5MN81NzHkQLz1V6DOzteegS0o-4dc,3421
|
|
73
73
|
g4f/Provider/needs_auth/FenayAI.py,sha256=2NkDnhdEVDMD1Xk13rp78nRt7oGwbgsX0jlonWt-Ym8,519
|
|
74
|
-
g4f/Provider/needs_auth/Gemini.py,sha256=
|
|
74
|
+
g4f/Provider/needs_auth/Gemini.py,sha256=p0idmlvIbjg3kMEGsOv5N9b-j5b-blNT2yxO2xnAmiQ,22853
|
|
75
75
|
g4f/Provider/needs_auth/GeminiCLI.py,sha256=BNQv_Hqzu3E0GtVRbZDZdcq--ZHpJDdLRF5ssG4yX9o,23554
|
|
76
76
|
g4f/Provider/needs_auth/GeminiPro.py,sha256=zZBvjc7N313aqp08s8OyNb0kZDn_YTpVdFvSo2GuqD8,767
|
|
77
77
|
g4f/Provider/needs_auth/GigaChat.py,sha256=2IqQlav_-g-4ZUMJ0tO8KGpvchg9_0ap6rzGP_5dLRI,6325
|
|
@@ -80,7 +80,7 @@ g4f/Provider/needs_auth/GithubCopilotAPI.py,sha256=O-8Bq6eWrVZTYFS5QufMDJ9SiSFsd
|
|
|
80
80
|
g4f/Provider/needs_auth/GlhfChat.py,sha256=qSPKXnQ7igjF6_kiBnFhwq-YAqGmpZg_yu4OMRliSP4,1189
|
|
81
81
|
g4f/Provider/needs_auth/Grok.py,sha256=3uwt0vjsSNHLZKS2DcUHTztiNqPIemwW82E2x0AQRTw,12884
|
|
82
82
|
g4f/Provider/needs_auth/Groq.py,sha256=30XyhPJYnZG-_t_gZx8vkLmJK-sYyvUE03edEJjbPbE,548
|
|
83
|
-
g4f/Provider/needs_auth/LMArena.py,sha256=
|
|
83
|
+
g4f/Provider/needs_auth/LMArena.py,sha256=dKwHEgdvEY9ctjNZzi-COdV8RHqV_z7qEoKiLGGhxus,121399
|
|
84
84
|
g4f/Provider/needs_auth/MetaAI.py,sha256=Bz9pvJUVH7RtCAP1Huvay-EgO057fL362mhx3GtVAqM,10653
|
|
85
85
|
g4f/Provider/needs_auth/MetaAIAccount.py,sha256=D4LnhAt2MuKx1a4uSgX2lUbQrzAkeIYm8JCnZieZiak,672
|
|
86
86
|
g4f/Provider/needs_auth/MicrosoftDesigner.py,sha256=4sJdjBPgiW9TEh4CeplCTNPXv6ZtZtFh0SYAiVfnrqk,7178
|
|
@@ -140,7 +140,7 @@ g4f/Provider/template/OpenaiTemplate.py,sha256=qjuIORIXyWHE4DRpDNt8MUDtlbGFpPfK1
|
|
|
140
140
|
g4f/Provider/template/__init__.py,sha256=FmQdc8a8YLN5kW0mos2owDekq01rU0lv7bdmiAW-f5A,77
|
|
141
141
|
g4f/Provider/yupp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
142
142
|
g4f/Provider/yupp/models.py,sha256=oXMyfnDYievE1q92arOVxrhy_QpsBzICtoZesJUY-Po,10225
|
|
143
|
-
g4f/api/__init__.py,sha256=
|
|
143
|
+
g4f/api/__init__.py,sha256=fNj92828FjGD71Ga34Rjto_cQ3dWoFe8DkN722dyLZQ,41356
|
|
144
144
|
g4f/api/_logging.py,sha256=7fh8hjDzp6NeMUbuNJ30UnWFu86KA2FEI0EsaIhw1Kc,910
|
|
145
145
|
g4f/api/_tokenizer.py,sha256=0Kbd6sM_8jQ3ph-1jM4JZeBCOAWsAv4iaxzHtdwHqto,286
|
|
146
146
|
g4f/api/run.py,sha256=orx-noEaB6FrO3xVcdXLOpzb3Wim09o4zYvNuaUa9l4,75
|
|
@@ -210,9 +210,9 @@ g4f/tools/files.py,sha256=bUTbeNp8ujTZQiW3GLTtFcgl3-1AnH3cDyIKHfh6Mjc,23397
|
|
|
210
210
|
g4f/tools/media.py,sha256=AE9hGVRxQBVZzQ_Ylzeoo2TJUGXSBXO5RbLwj1I2ZTE,4701
|
|
211
211
|
g4f/tools/run_tools.py,sha256=Yb0osWdDt4wUnkvwln4R6qcLapdddC3n2giZMPXWkzM,16662
|
|
212
212
|
g4f/tools/web_search.py,sha256=vAZJD-qy15llsgAbkXzoEltqdFB6TlKLbqDJ1DS-6vs,2086
|
|
213
|
-
g4f-6.9.
|
|
214
|
-
g4f-6.9.
|
|
215
|
-
g4f-6.9.
|
|
216
|
-
g4f-6.9.
|
|
217
|
-
g4f-6.9.
|
|
218
|
-
g4f-6.9.
|
|
213
|
+
g4f-6.9.7.dist-info/licenses/LICENSE,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
|
|
214
|
+
g4f-6.9.7.dist-info/METADATA,sha256=hkmc6fZKRbRlrEGsojk2_hJBtaC3H6B5XT0J7nooFKE,23255
|
|
215
|
+
g4f-6.9.7.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
|
|
216
|
+
g4f-6.9.7.dist-info/entry_points.txt,sha256=J7Usl6dNjXJlvuzGAUEm6cuDXWpVdGq7SfK-tPoiZSI,67
|
|
217
|
+
g4f-6.9.7.dist-info/top_level.txt,sha256=bMRlTupWYCcLWy80AnnKZkhpBsXsF8gI3BaMhSZSgRo,4
|
|
218
|
+
g4f-6.9.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|