diff --git a/src/lib/initDB.ts b/src/lib/initDB.ts index b9587e4..6f7827b 100644 --- a/src/lib/initDB.ts +++ b/src/lib/initDB.ts @@ -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"); diff --git a/src/routes/production/editImage/generateFlowImage.ts b/src/routes/production/editImage/generateFlowImage.ts index 1c16c4f..3c4a1b5 100644 --- a/src/routes/production/editImage/generateFlowImage.ts +++ b/src/routes/production/editImage/generateFlowImage.ts @@ -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); diff --git a/src/routes/production/workbench/generateVideoPrompt.ts b/src/routes/production/workbench/generateVideoPrompt.ts index 79fe8d9..fd15828 100644 --- a/src/routes/production/workbench/generateVideoPrompt.ts +++ b/src/routes/production/workbench/generateVideoPrompt.ts @@ -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) => ``, + )}, + `; 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, }); diff --git a/src/types/database.d.ts b/src/types/database.d.ts index e8fc2c6..0c14533 100644 --- a/src/types/database.d.ts +++ b/src/types/database.d.ts @@ -1,6 +1,81 @@ +<<<<<<< HEAD // @db-hash a716ace4700f9295d6e6ba5efb945fec //该文件由脚本自动生成,请勿手动修改 +======= +// @db-hash 34cef71f073127ef469a712aa9d9ba8f +//该文件由脚本自动生成,请勿手动修改 + +export interface _o_project_old_20260402 { + 'artStyle'?: string | null; + 'createTime'?: number | 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_storyboard_old_20260402 { + 'createTime'?: number | null; + 'duration'?: string | null; + 'filePath'?: string | null; + 'flowId'?: number | null; + 'id'?: number; + 'index'?: number | null; + 'projectId'?: number | null; + 'prompt'?: string | null; + 'reason'?: string | null; + 'scriptId'?: number | null; + 'state'?: string | null; + 'trackId'?: number | null; +} +export interface _o_storyboard_old_20260402_1 { + 'createTime'?: number | null; + 'duration'?: string | null; + 'filePath'?: string | null; + 'flowId'?: number | null; + 'id'?: number; + 'index'?: number | null; + 'projectId'?: number | null; + 'prompt'?: string | null; + 'reason'?: string | null; + 'scriptId'?: number | null; + 'shouldGenerateImage'?: number | null; + 'state'?: string | null; + 'track'?: string | null; + 'trackId'?: number | null; + 'videoPrompt'?: string | null; +} +export interface _o_vendorConfig_old_20260401 { + 'author'?: string | null; + 'code'?: string | null; + 'createTime'?: number | null; + 'description'?: string | null; + 'enableEnglish'?: number | null; + 'icon'?: string | null; + 'id'?: string; + 'inputs'?: string | null; + 'inputValues'?: string | null; + 'models'?: string | null; + 'name'?: string | null; +} +export interface _o_videoTrack_old_20260402 { + 'id'?: number; + 'projectId'?: number | null; + 'prompt'?: string | null; + 'reason'?: string | null; + 'scriptId'?: number | null; + 'selectVideoId'?: number | null; + 'state'?: string | null; + 'videoId'?: number | null; +} +>>>>>>> 9d683e67bba6b5a4d4489a4202e4af4a738bca59 export interface memories { 'content': string; 'createTime': number; @@ -230,6 +305,14 @@ export interface o_videoTrack { } export interface DB { +<<<<<<< HEAD +======= + "_o_project_old_20260402": _o_project_old_20260402; + "_o_storyboard_old_20260402": _o_storyboard_old_20260402; + "_o_storyboard_old_20260402_1": _o_storyboard_old_20260402_1; + "_o_vendorConfig_old_20260401": _o_vendorConfig_old_20260401; + "_o_videoTrack_old_20260402": _o_videoTrack_old_20260402; +>>>>>>> 9d683e67bba6b5a4d4489a4202e4af4a738bca59 "memories": memories; "o_agentDeploy": o_agentDeploy; "o_agentWorkData": o_agentWorkData;