mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
wip: admin models setting
This commit is contained in:
@@ -188,6 +188,13 @@ class ModelsTable:
|
||||
for model in db.query(Model).filter(Model.base_model_id != None).all()
|
||||
]
|
||||
|
||||
def get_base_models(self) -> list[ModelModel]:
|
||||
with get_db() as db:
|
||||
return [
|
||||
ModelModel.model_validate(model)
|
||||
for model in db.query(Model).filter(Model.base_model_id == None).all()
|
||||
]
|
||||
|
||||
def get_models_by_user_id(
|
||||
self, user_id: str, permission: str = "write"
|
||||
) -> list[ModelModel]:
|
||||
|
||||
Reference in New Issue
Block a user