mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
feat: add UI support for updating model info
This commit is contained in:
@@ -283,7 +283,7 @@ async def get_models(user=Depends(get_current_user)):
|
||||
|
||||
def add_custom_info_to_model(model: dict):
|
||||
model["custom_info"] = next(
|
||||
(item for item in app.state.MODEL_CONFIG if item["name"] == model["id"]), {}
|
||||
(item for item in app.state.MODEL_CONFIG if item["id"] == model["id"]), {}
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -176,7 +176,7 @@ async def get_all_models():
|
||||
|
||||
def add_custom_info_to_model(model: dict):
|
||||
model["custom_info"] = next(
|
||||
(item for item in app.state.MODEL_CONFIG if item["name"] == model["model"]), {}
|
||||
(item for item in app.state.MODEL_CONFIG if item["id"] == model["model"]), {}
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -230,7 +230,7 @@ async def get_all_models():
|
||||
|
||||
def add_custom_info_to_model(model: dict):
|
||||
model["custom_info"] = next(
|
||||
(item for item in app.state.MODEL_CONFIG if item["name"] == model["id"]), {}
|
||||
(item for item in app.state.MODEL_CONFIG if item["id"] == model["id"]), {}
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user