enh: models display author name

This commit is contained in:
Timothy Jaeryang Baek
2024-11-18 05:37:04 -08:00
parent 03b606925e
commit a2a25fb571
5 changed files with 33 additions and 20 deletions

View File

@@ -4,6 +4,7 @@ from open_webui.apps.webui.models.models import (
ModelForm,
ModelModel,
ModelResponse,
ModelUserResponse,
Models,
)
from open_webui.constants import ERROR_MESSAGES
@@ -22,7 +23,7 @@ router = APIRouter()
###########################
@router.get("/", response_model=list[ModelResponse])
@router.get("/", response_model=list[ModelUserResponse])
async def get_models(id: Optional[str] = None, user=Depends(get_verified_user)):
if user.role == "admin":
return Models.get_models()