diff --git a/src/routes/production/workbench/generateVideoPrompt.ts b/src/routes/production/workbench/generateVideoPrompt.ts index a0bf5ca..9d0895c 100644 --- a/src/routes/production/workbench/generateVideoPrompt.ts +++ b/src/routes/production/workbench/generateVideoPrompt.ts @@ -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) => ``, )}, `; - try { const { text } = await u.Ai.Text("universalAi").invoke({ - system: videoPrompt?.data!, + system: videoPromptGeneration, messages: [ { role: "assistant", diff --git a/src/types/database.d.ts b/src/types/database.d.ts index 2a9745d..8adea86 100644 --- a/src/types/database.d.ts +++ b/src/types/database.d.ts @@ -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;