mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
refac: show connection type for custom models
This commit is contained in:
parent
954aaa6bdc
commit
39f7575b64
1 changed files with 5 additions and 0 deletions
|
|
@ -191,6 +191,8 @@ async def get_all_models(request, refresh: bool = False, user: UserModel = None)
|
||||||
):
|
):
|
||||||
# Custom model based on a base model
|
# Custom model based on a base model
|
||||||
owned_by = "openai"
|
owned_by = "openai"
|
||||||
|
connection_type = None
|
||||||
|
|
||||||
pipe = None
|
pipe = None
|
||||||
|
|
||||||
for m in models:
|
for m in models:
|
||||||
|
|
@ -201,6 +203,8 @@ async def get_all_models(request, refresh: bool = False, user: UserModel = None)
|
||||||
owned_by = m.get("owned_by", "unknown")
|
owned_by = m.get("owned_by", "unknown")
|
||||||
if "pipe" in m:
|
if "pipe" in m:
|
||||||
pipe = m["pipe"]
|
pipe = m["pipe"]
|
||||||
|
|
||||||
|
connection_type = m.get("connection_type", None)
|
||||||
break
|
break
|
||||||
|
|
||||||
model = {
|
model = {
|
||||||
|
|
@ -209,6 +213,7 @@ async def get_all_models(request, refresh: bool = False, user: UserModel = None)
|
||||||
"object": "model",
|
"object": "model",
|
||||||
"created": custom_model.created_at,
|
"created": custom_model.created_at,
|
||||||
"owned_by": owned_by,
|
"owned_by": owned_by,
|
||||||
|
"connection_type": connection_type,
|
||||||
"preset": True,
|
"preset": True,
|
||||||
**({"pipe": pipe} if pipe is not None else {}),
|
**({"pipe": pipe} if pipe is not None else {}),
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue