no message

This commit is contained in:
zhishi 2026-04-02 21:02:38 +08:00
parent e6ed645898
commit fdabb9530b
3 changed files with 20 additions and 7 deletions

View File

@ -894,6 +894,7 @@ Lone figure on city wall, then arrival of a companion. Tension between determina
table.text("state");
table.integer("trackId");
table.text("reason");
table.text("track");
table.text("videoDesc");
table.integer("shouldGenerateImage"); // 0 否 1 是
table.integer("projectId");

View File

@ -23,7 +23,7 @@ export default router.post(
projectId: z.number(),
}),
async (req, res) => {
const { model, references = [], quality, ratio, prompt, projectId, type } = req.body;
const { model, references = [], quality, ratio, prompt, projectId } = req.body;
const imageClass = await u.Ai.Image(model).run(
{
@ -39,7 +39,7 @@ export default router.post(
projectId: projectId,
},
);
const savePath = `${projectId}/${type}/${u.uuid()}.jpg`;
const savePath = `${projectId}/workFlow/${u.uuid()}.jpg`;
await imageClass.save(savePath);
const url = await u.oss.getFileUrl(savePath);

View File

@ -79,19 +79,31 @@ export default router.post(
const data = projectData?.directorManual || "无";
const visualManual = u.getArtPrompt(artStyle, "art_skills", "art_storyboard_video");
const directorManual = u.getArtPrompt(data, "story_skills", "narrative_sweet_romance");
const content = `
****${modelData},
****):${assets.map((i) => `[id:${i.id},type:${i.type},name:${i.name}]`).join("")},
****${storyboard.map(
(i) => `<storyboardItem
videoDesc=${i.videoDesc}
prompt=${i.prompt}
track=${i.track}
duration=${i.duration}
associateAssetsIds=${i.associateAssetsIds}
shouldGenerateImage='${i.shouldGenerateImage == 1 ? "true" : "false"}'
></storyboardItem>`,
)},
`;
const { text } = await u.Ai.Text("universalAi").invoke({
system: `${videoPrompt?.data}\n${visualManual}\n${directorManual}`,
messages: [
{
role: "user",
content: `
****${modelData},
****):${JSON.stringify(assets)},
****${JSON.stringify(storyboard)},
`,
content: content,
},
],
});
console.log("%c Line:83 🍷 text", "background:#3f7cff", text);
await u.db("o_videoTrack").where({ id: trackId }).update({
prompt: text,
});