Merge branch 'develop'

This commit is contained in:
ACT丶流星雨 2026-04-07 19:11:12 +08:00
commit b97a4a4bca
2 changed files with 48 additions and 9 deletions

View File

@ -75,26 +75,31 @@ export default router.post(
const [id, modelData] = model.split(":");
const projectData = await u.db("o_project").select("*").where({ id: projectId }).first();
const videoPrompt = await u.db("o_prompt").where("type", "videoPromptGeneration").first();
let videoPromptGeneration = "" as string | undefined;
if (videoPrompt && videoPrompt.useData) {
videoPromptGeneration = videoPrompt.useData;
} else {
videoPromptGeneration = videoPrompt?.data ?? undefined;
}
const artStyle = projectData?.artStyle || "无";
const visualManual = u.getArtPrompt(artStyle, "art_skills", "art_storyboard_video");
const content = `
****${modelData},
****):${assets.map((i) => `[id:${i.id},type:${i.type},name:${i.name}]`).join("")},
****):${assets.map((i) => `[${i.id},${i.type},${i.name}]`).join("")},
****${storyboard.map(
(i) => `<storyboardItem
videoDesc=${i.videoDesc}
prompt=${i.prompt}
track=${i.track}
duration=${i.duration}
associateAssetsIds=${i.associateAssetsIds}
videoDesc='${i.videoDesc}'
prompt='${i.prompt}'
track='${i.track}'
duration='${i.duration}'
associateAssetsIds='[${i.associateAssetsIds}]'
shouldGenerateImage='${i.shouldGenerateImage == 1 ? "true" : "false"}'
></storyboardItem>`,
)},
`;
try {
const { text } = await u.Ai.Text("universalAi").invoke({
system: videoPrompt?.data!,
system: videoPromptGeneration,
messages: [
{
role: "assistant",

View File

@ -1,6 +1,37 @@
// @db-hash 3296433eb24314b094ac5d3839c049c5
// @db-hash 6cd709d9bdfe00c4dc87961a8ebba149
//该文件由脚本自动生成,请勿手动修改
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 _o_prompt_old_20260406 {
'data'?: string | null;
'id'?: number;
'name'?: string | null;
'type'?: string | null;
'useData'?: string | null;
}
export interface _o_prompt_old_20260406_1 {
'data'?: string | null;
'id'?: number;
'name'?: string | null;
'TEXT'?: any | null;
'type'?: string | null;
'useData'?: string | null;
}
export interface memories {
'content': string;
'createTime': number;
@ -232,6 +263,9 @@ export interface o_videoTrack {
}
export interface DB {
"_o_project_old_20260404": _o_project_old_20260404;
"_o_prompt_old_20260406": _o_prompt_old_20260406;
"_o_prompt_old_20260406_1": _o_prompt_old_20260406_1;
"memories": memories;
"o_agentDeploy": o_agentDeploy;
"o_agentWorkData": o_agentWorkData;