1
This commit is contained in:
20
index.js
20
index.js
@ -28,18 +28,18 @@ const config = {
|
||||
|
||||
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 => {
|
||||
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 => {
|
||||
kernel.model.add({
|
||||
modelId: model.id,
|
||||
modelUrl: model.file_url || `http://localhost:3001${model.file_path}`,
|
||||
modelControlType: model.model_control_type,
|
||||
modelId: model.id,
|
||||
modelUrl: model.file_url || `http://localhost:3001${model.file_path}`,
|
||||
modelControlType: model.model_control_type,
|
||||
});
|
||||
})
|
||||
})
|
||||
|
||||
// kernel.model.add({
|
||||
// modelId: "框架",
|
||||
|
||||
Reference in New Issue
Block a user