Merge pull request #1366 from devAdityaa/main

Fixed FakeGPT error caused by empty token_ids list
This commit is contained in:
H Lohaus 2023-12-19 21:39:41 +01:00 committed by GitHub
commit 8200e2e2f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ class FakeGpt(AsyncGeneratorProvider):
async with session.get(f"{cls.url}/api/loads", params={"t": int(time.time())}, proxy=proxy) as response:
response.raise_for_status()
list = (await response.json())["loads"]
token_ids = [t["token_id"] for t in list if t["count"] == 0]
token_ids = [t["token_id"] for t in list]
data = {
"token_key": random.choice(token_ids),
"session_password": get_random_string()