mirror of
https://git.mirrors.martin98.com/https://github.com/open-webui/open-webui
synced 2025-08-18 01:55:54 +08:00
refac
This commit is contained in:
parent
bc2b5d3cc8
commit
2fcf5d8578
@ -1023,6 +1023,7 @@ async def get_models(request: Request, user=Depends(get_verified_user)):
|
||||
if "pipeline" in model and model["pipeline"].get("type", None) == "filter":
|
||||
continue
|
||||
|
||||
try:
|
||||
model_tags = [
|
||||
tag.get("name")
|
||||
for tag in model.get("info", {}).get("meta", {}).get("tags", [])
|
||||
@ -1031,6 +1032,10 @@ async def get_models(request: Request, user=Depends(get_verified_user)):
|
||||
|
||||
tags = list(set(model_tags + tags))
|
||||
model["tags"] = [{"name": tag} for tag in tags]
|
||||
except Exception as e:
|
||||
log.debug(f"Error processing model tags: {e}")
|
||||
model["tags"] = []
|
||||
pass
|
||||
|
||||
models.append(model)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user