feat: Add Stability API server relay sending

This commit is contained in:
licoy
2024-07-09 09:50:04 +08:00
parent a16725ac17
commit 2b0153807c
10 changed files with 220 additions and 31 deletions

View File

@@ -307,22 +307,12 @@ export function SdPanel() {
model_name: currentModel.name,
status: "wait",
params: reqParams,
created_at: new Date().toISOString(),
created_at: new Date().toLocaleString(),
img_data: "",
};
sdListDb.add(data).then(
(id) => {
data = { ...data, id, status: "running" };
sdListDb.update(data);
execCountInc();
sendSdTask(data, sdListDb, execCountInc);
setParams(getModelParamBasicData(columns, params, true));
},
(error) => {
console.error(error);
showToast(`error: ` + error.message);
},
);
sendSdTask(data, sdListDb, execCountInc, () => {
setParams(getModelParamBasicData(columns, params, true));
});
};
return (
<>