mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 04:45:19 +00:00
refac: openai model list
This commit is contained in:
parent
901c997054
commit
6d0f757848
1 changed files with 4 additions and 0 deletions
|
|
@ -369,6 +369,10 @@ async def get_all_models_responses(request: Request, user: UserModel) -> list:
|
|||
model_list = []
|
||||
|
||||
for model in model_list:
|
||||
# Remove name key if its value is None #16689
|
||||
if "name" in model and model["name"] is None:
|
||||
del model["name"]
|
||||
|
||||
if prefix_id:
|
||||
model["id"] = (
|
||||
f"{prefix_id}.{model.get('id', model.get('name', ''))}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue