This commit is contained in:
2026-05-14 20:40:56 +08:00
parent 19bb93dce4
commit efc3951227
6 changed files with 1063 additions and 64 deletions

View File

@ -1,5 +1,4 @@
import { kernel } from './src/main.ts';
// import { kernel } from 'https://sdk.zguiy.com/zt/assets/index.js';
// const config = {
@ -31,13 +30,15 @@ kernel.init(config);
const response = await fetch('http://localhost:3001/api/models/auto-load/list')
const data = await response.json()
const models = data.data // 这就是模型列表
console.log(models);
models.forEach(model => {
console.log(model);
kernel.dropZone.setData(model.placement_zone);
kernel.model.add({
modelId: model.id,
modelUrl: model.file_url || `http://localhost:3001${model.file_path}`,
modelUrl: model.file_url,
modelControlType: model.model_control_type,
});
})