This commit is contained in:
Timothy J. Baek
2024-05-24 20:29:13 -07:00
parent e316abcfc8
commit ca3108a54d
8 changed files with 356 additions and 171 deletions
+5 -2
View File
@@ -314,10 +314,12 @@ async def get_all_models():
model["name"] = custom_model.name
model["info"] = custom_model.model_dump()
else:
owned_by = "openai"
for model in models:
if custom_model.base_model_id == model["id"]:
if (
custom_model.base_model_id == model["id"]
or custom_model.base_model_id == model["id"].split(":")[0]
):
owned_by = model["owned_by"]
break
@@ -329,6 +331,7 @@ async def get_all_models():
"created": custom_model.created_at,
"owned_by": owned_by,
"info": custom_model.model_dump(),
"preset": True,
}
)