mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
fix: Models workspace page crash
This commit is contained in:
parent
2b1a29d44b
commit
7c08ce2217
1 changed files with 7 additions and 2 deletions
|
|
@ -68,20 +68,25 @@
|
|||
let models = null;
|
||||
let total = null;
|
||||
|
||||
let searchDebounceTimer;
|
||||
|
||||
$: if (
|
||||
page !== undefined &&
|
||||
query !== undefined &&
|
||||
selectedTag !== undefined &&
|
||||
viewOption !== undefined
|
||||
) {
|
||||
getModelList();
|
||||
clearTimeout(searchDebounceTimer);
|
||||
searchDebounceTimer = setTimeout(() => {
|
||||
getModelList();
|
||||
}, 300);
|
||||
}
|
||||
|
||||
const getModelList = async () => {
|
||||
try {
|
||||
const res = await getWorkspaceModels(
|
||||
localStorage.token,
|
||||
query,
|
||||
query.slice(0, 500),
|
||||
viewOption,
|
||||
selectedTag,
|
||||
null,
|
||||
|
|
|
|||
Loading…
Reference in a new issue