mirror of
https://github.com/cunnymessiah/keychecker.git
synced 2026-05-10 18:39:04 -07:00
fix for model ordering
This commit is contained in:
@@ -14,7 +14,7 @@ async def get_oai_model(key: APIKey, session, retries, org=None):
|
|||||||
async with session.get(f'{oai_api_url}/models', headers=headers) as response:
|
async with session.get(f'{oai_api_url}/models', headers=headers) as response:
|
||||||
if response.status == 200:
|
if response.status == 200:
|
||||||
data = await response.json()
|
data = await response.json()
|
||||||
models = data["data"]
|
models = sorted(data["data"], key=lambda m: len(m["id"]))
|
||||||
top_model = "gpt-3.5-turbo"
|
top_model = "gpt-3.5-turbo"
|
||||||
for model in models:
|
for model in models:
|
||||||
if "ft:" in model["id"]:
|
if "ft:" in model["id"]:
|
||||||
|
|||||||
Reference in New Issue
Block a user