mirror of
https://github.com/open-webui/open-webui
synced 2024-11-25 13:29:53 +00:00
11 lines
238 B
Python
11 lines
238 B
Python
from apps.webui.models.models import Models, ModelModel, ModelForm, ModelResponse
|
|
|
|
|
|
def get_model_id_from_custom_model_id(id: str):
|
|
model = Models.get_model_by_id(id)
|
|
|
|
if model:
|
|
return model.id
|
|
else:
|
|
return id
|