feat: search draft models from remote

This commit is contained in:
jialin
2025-11-03 10:14:30 +08:00
parent d5cc617848
commit 1a92cc8543
4 changed files with 142 additions and 7 deletions
+4 -2
View File
@@ -255,20 +255,22 @@ export async function queryModelScopeModelFiles(
// list models from huggingface
export async function queryHuggingfaceModels(
params: {
limit?: number;
search: {
query: string;
tags: string[];
tags?: string[];
sort?: string;
task?: PipelineType;
};
},
options?: any
) {
console.log('params', params);
const result = [];
for await (const model of listModels({
...params,
...options,
limit: 500,
limit: params.limit || 500,
additionalFields: ['sha', 'tags'],
fetch(_url: string, config: any) {
const url = params.search.sort