no message
This commit is contained in:
parent
e6ed645898
commit
fdabb9530b
@ -894,6 +894,7 @@ Lone figure on city wall, then arrival of a companion. Tension between determina
|
|||||||
table.text("state");
|
table.text("state");
|
||||||
table.integer("trackId");
|
table.integer("trackId");
|
||||||
table.text("reason");
|
table.text("reason");
|
||||||
|
table.text("track");
|
||||||
table.text("videoDesc");
|
table.text("videoDesc");
|
||||||
table.integer("shouldGenerateImage"); // 0 否 1 是
|
table.integer("shouldGenerateImage"); // 0 否 1 是
|
||||||
table.integer("projectId");
|
table.integer("projectId");
|
||||||
|
|||||||
@ -23,7 +23,7 @@ export default router.post(
|
|||||||
projectId: z.number(),
|
projectId: z.number(),
|
||||||
}),
|
}),
|
||||||
async (req, res) => {
|
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(
|
const imageClass = await u.Ai.Image(model).run(
|
||||||
{
|
{
|
||||||
@ -39,7 +39,7 @@ export default router.post(
|
|||||||
projectId: projectId,
|
projectId: projectId,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
const savePath = `${projectId}/${type}/${u.uuid()}.jpg`;
|
const savePath = `${projectId}/workFlow/${u.uuid()}.jpg`;
|
||||||
await imageClass.save(savePath);
|
await imageClass.save(savePath);
|
||||||
|
|
||||||
const url = await u.oss.getFileUrl(savePath);
|
const url = await u.oss.getFileUrl(savePath);
|
||||||
|
|||||||
@ -79,19 +79,31 @@ export default router.post(
|
|||||||
const data = projectData?.directorManual || "无";
|
const data = projectData?.directorManual || "无";
|
||||||
const visualManual = u.getArtPrompt(artStyle, "art_skills", "art_storyboard_video");
|
const visualManual = u.getArtPrompt(artStyle, "art_skills", "art_storyboard_video");
|
||||||
const directorManual = u.getArtPrompt(data, "story_skills", "narrative_sweet_romance");
|
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({
|
const { text } = await u.Ai.Text("universalAi").invoke({
|
||||||
system: `${videoPrompt?.data}\n${visualManual}\n${directorManual}`,
|
system: `${videoPrompt?.data}\n${visualManual}\n${directorManual}`,
|
||||||
messages: [
|
messages: [
|
||||||
{
|
{
|
||||||
role: "user",
|
role: "user",
|
||||||
content: `
|
content: content,
|
||||||
**模型名称**:${modelData},
|
|
||||||
**资产信息**(角色、场景、道具):${JSON.stringify(assets)},
|
|
||||||
**分镜信息**:${JSON.stringify(storyboard)},
|
|
||||||
`,
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
console.log("%c Line:83 🍷 text", "background:#3f7cff", text);
|
||||||
|
|
||||||
await u.db("o_videoTrack").where({ id: trackId }).update({
|
await u.db("o_videoTrack").where({ id: trackId }).update({
|
||||||
prompt: text,
|
prompt: text,
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user