返回提交历史
Modified
g4f/Provider/Yupp.py
+4
-9
XFEstudio/gpt4free
Update Yupp.py
e8168818
代码差异
1 个文件
+4
-9
@@ -41,21 +41,16 @@ def load_yupp_accounts(tokens_str: str):
41
41
global YUPP_ACCOUNTS
42
42
if not tokens_str:
43
43
return
44
45
44
tokens = [token.strip() for token in tokens_str.split(',') if token.strip()]
46
# reuse history of accounts
47
old_account = YUPP_ACCOUNTS.copy()
48
YUPP_ACCOUNTS.clear()
49
YUPP_ACCOUNTS.extend([
50
next(filter(lambda x:x.get("token")==token, old_account),
51
{
45
YUPP_ACCOUNTS = [
46
{
52
47
"token": token,
53
48
"is_valid": True,
54
49
"error_count": 0,
55
50
"last_used": 0.0
56
})
51
}
57
52
for token in tokens
58
])
53
]
59
54
60
55
def create_headers() -> Dict[str, str]:
61
56
"""Create headers for requests"""