feat: add pagination for searching models

This commit is contained in:
jialin
2025-06-10 19:24:13 +08:00
parent 0eaa3aeeb7
commit 281d8bddc1
7 changed files with 183 additions and 64 deletions
+4 -4
View File
@@ -191,11 +191,11 @@ export async function queryModelScopeModels(
'Content-Type': 'application/json'
},
body: JSON.stringify({
PageSize: 10,
PageNumber: 1,
...params,
...Criterion,
Name: `${params.Name}`,
PageSize: 10,
PageNumber: 1
Name: `${params.Name}`
})
});
if (!res.ok) {
@@ -256,7 +256,7 @@ export async function queryHuggingfaceModels(
for await (const model of listModels({
...params,
...options,
limit: 10,
limit: 500,
additionalFields: ['sha', 'tags'],
fetch(_url: string, config: any) {
const url = params.search.sort