mirror of
https://github.com/open-webui/open-webui
synced 2025-05-21 05:35:18 +00:00
refac
This commit is contained in:
parent
3b74431ea3
commit
6c77e6fdb3
@ -234,8 +234,10 @@
|
|||||||
ollamaVersion = await getOllamaVersion(localStorage.token).catch((error) => false);
|
ollamaVersion = await getOllamaVersion(localStorage.token).catch((error) => false);
|
||||||
|
|
||||||
if (items) {
|
if (items) {
|
||||||
tags = items.flatMap((item) => item.model?.info?.meta?.tags ?? []);
|
tags = items.flatMap((item) => item.model?.info?.meta?.tags ?? []).map((tag) => tag.name);
|
||||||
tags = [...new Set(tags)].map((tag) => tag.name).sort();
|
|
||||||
|
// Remove duplicates and sort
|
||||||
|
tags = Array.from(new Set(tags)).sort((a, b) => a.localeCompare(b));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user