mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2026-07-11 05:30:20 +00:00
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 {
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user