feat: pre-select models in the webui using alias (#25492)
Co-authored-by: example name <example@example.org>
This commit is contained in:
@@ -633,7 +633,12 @@ class ModelsStore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
findModelByName(modelName: string): ModelOption | null {
|
findModelByName(modelName: string): ModelOption | null {
|
||||||
return this.models.find((model) => model.model === modelName) ?? null;
|
return (
|
||||||
|
this.models.find(
|
||||||
|
(model) =>
|
||||||
|
model.model === modelName || model.id === modelName || model.aliases?.includes(modelName)
|
||||||
|
) ?? null
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
findModelById(modelId: string): ModelOption | null {
|
findModelById(modelId: string): ModelOption | null {
|
||||||
|
|||||||
Reference in New Issue
Block a user