添加错误返回,项目表添加自增id
This commit is contained in:
parent
0f04b0649c
commit
5559c67c47
@ -43,6 +43,7 @@ export default async (knex: Knex, forceInit: boolean = false): Promise<void> =>
|
|||||||
table.integer("createTime");
|
table.integer("createTime");
|
||||||
table.integer("userId");
|
table.integer("userId");
|
||||||
table.primary(["id"]);
|
table.primary(["id"]);
|
||||||
|
table.unique(["id"]);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
//风格表
|
//风格表
|
||||||
|
|||||||
@ -92,22 +92,26 @@ export default router.post(
|
|||||||
)},
|
)},
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const { text } = await u.Ai.Text("universalAi").invoke({
|
try {
|
||||||
system: videoPrompt?.data!,
|
const { text } = await u.Ai.Text("universalAi").invoke({
|
||||||
messages: [
|
system: videoPrompt?.data!,
|
||||||
{
|
messages: [
|
||||||
role: "assistant",
|
{
|
||||||
content: `${visualManual}`,
|
role: "assistant",
|
||||||
},
|
content: `${visualManual}`,
|
||||||
{
|
},
|
||||||
role: "user",
|
{
|
||||||
content: content,
|
role: "user",
|
||||||
},
|
content: content,
|
||||||
],
|
},
|
||||||
});
|
],
|
||||||
await u.db("o_videoTrack").where({ id: trackId }).update({
|
});
|
||||||
prompt: text,
|
await u.db("o_videoTrack").where({ id: trackId }).update({
|
||||||
});
|
prompt: text,
|
||||||
res.status(200).send(success(text));
|
});
|
||||||
|
res.status(200).send(success(text));
|
||||||
|
} catch (error) {
|
||||||
|
res.status(500).send(error);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
19
src/types/database.d.ts
vendored
19
src/types/database.d.ts
vendored
@ -1,6 +1,22 @@
|
|||||||
// @db-hash 6fa5017e455bc367c9c902ba574d11b4
|
// @db-hash 19c726e36479d905346c772cfa8007ba
|
||||||
//该文件由脚本自动生成,请勿手动修改
|
//该文件由脚本自动生成,请勿手动修改
|
||||||
|
|
||||||
|
export interface _o_project_old_20260404 {
|
||||||
|
'artStyle'?: string | null;
|
||||||
|
'createTime'?: number | null;
|
||||||
|
'directorManual'?: string | null;
|
||||||
|
'id'?: number | null;
|
||||||
|
'imageModel'?: string | null;
|
||||||
|
'imageQuality'?: string | null;
|
||||||
|
'intro'?: string | null;
|
||||||
|
'mode'?: string | null;
|
||||||
|
'name'?: string | null;
|
||||||
|
'projectType'?: string | null;
|
||||||
|
'type'?: string | null;
|
||||||
|
'userId'?: number | null;
|
||||||
|
'videoModel'?: string | null;
|
||||||
|
'videoRatio'?: string | null;
|
||||||
|
}
|
||||||
export interface memories {
|
export interface memories {
|
||||||
'content': string;
|
'content': string;
|
||||||
'createTime': number;
|
'createTime': number;
|
||||||
@ -231,6 +247,7 @@ export interface o_videoTrack {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface DB {
|
export interface DB {
|
||||||
|
"_o_project_old_20260404": _o_project_old_20260404;
|
||||||
"memories": memories;
|
"memories": memories;
|
||||||
"o_agentDeploy": o_agentDeploy;
|
"o_agentDeploy": o_agentDeploy;
|
||||||
"o_agentWorkData": o_agentWorkData;
|
"o_agentWorkData": o_agentWorkData;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user