mirror of
https://github.com/open-webui/open-webui
synced 2024-11-24 13:07:25 +00:00
refac
This commit is contained in:
parent
d4c42dcfa9
commit
51265b4683
@ -475,9 +475,13 @@
|
||||
selectedModels = $config?.default_models.split(',');
|
||||
}
|
||||
|
||||
if (selectedModels.length === 1 && selectedModels[0] === '') {
|
||||
selectedModels = selectedModels.filter((modelId) => $models.map((m) => m.id).includes(modelId));
|
||||
|
||||
if (selectedModels.length === 0 || (selectedModels.length === 1 && selectedModels[0] === '')) {
|
||||
if ($models.length > 0) {
|
||||
selectedModels = [$models[0].id];
|
||||
} else {
|
||||
selectedModels = [''];
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user