diff --git a/src/routes/assetsGenerate/batchPolishAssetsPrompt.ts b/src/routes/assetsGenerate/batchPolishAssetsPrompt.ts index 7f42327..130f7c0 100644 --- a/src/routes/assetsGenerate/batchPolishAssetsPrompt.ts +++ b/src/routes/assetsGenerate/batchPolishAssetsPrompt.ts @@ -111,7 +111,6 @@ export default router.post( 请根据以下参数生成${config.label}提示词: **基础参数:** - - 风格: ${project?.artStyle || "未指定"} - 小说类型: ${project?.type || "未指定"} - 小说背景: ${project?.intro || "未指定"} diff --git a/src/routes/production/exportImage.ts b/src/routes/production/exportImage.ts index cfd52ae..cd61be6 100644 --- a/src/routes/production/exportImage.ts +++ b/src/routes/production/exportImage.ts @@ -5,7 +5,6 @@ import { success } from "@/lib/responseFormat"; import { validateFields } from "@/middleware/middleware"; const router = express.Router(); import compressing from "compressing"; -import { flowDataSchema } from "@/agents/productionAgent/tools"; import path from "path"; import getPath from "@/utils/getPath"; diff --git a/src/routes/production/workbench/generateVideo.ts b/src/routes/production/workbench/generateVideo.ts index 2091683..cb38602 100644 --- a/src/routes/production/workbench/generateVideo.ts +++ b/src/routes/production/workbench/generateVideo.ts @@ -102,6 +102,7 @@ export default router.post( 3. 视频风格应与用户指定的模式数据相匹配,包括色彩、音乐、特效等元素。 4. 视频中应包含用户提供的图片,并在视频中适当展示,以增强视频的视觉效果。 5. 如果用户指定了音频,请确保视频中的音频与视频内容相匹配,符合用户的创意意图。`; + console.log("%c Line:110 🍑 prompt", "background:#b03734", prompt); const aiVideo = u.Ai.Video(model); await aiVideo.run({ diff --git a/src/routes/production/workbench/generateVideoPrompt.ts b/src/routes/production/workbench/generateVideoPrompt.ts index 70e5dde..9b7a23c 100644 --- a/src/routes/production/workbench/generateVideoPrompt.ts +++ b/src/routes/production/workbench/generateVideoPrompt.ts @@ -3,24 +3,23 @@ import u from "@/utils"; import { z } from "zod"; import { success } from "@/lib/responseFormat"; import { validateFields } from "@/middleware/middleware"; -import { Output } from "ai"; const router = express.Router(); export default router.post( "/", validateFields({ projectId: z.number(), - storyboardId: z.array(z.number()), + storyboardIds: z.array(z.number()), }), async (req, res) => { - const { projectId, storyboardId } = req.body; + const { projectId, storyboardIds } = req.body; // 查询分镜及其关联的资产提示词 const data = await u .db("o_storyboard") .leftJoin("o_assets2Storyboard", "o_storyboard.id", "o_assets2Storyboard.storyboardId") .leftJoin("o_assets", "o_assets2Storyboard.assetId", "o_assets.id") .leftJoin("o_videoConfig", "o_storyboard.id", "o_videoConfig.storyboardId") - .whereIn("o_storyboard.id", storyboardId) + .whereIn("o_storyboard.id", storyboardIds) .select("o_storyboard.id", "o_storyboard.prompt", "o_assets.prompt as assetPrompt", "o_videoConfig.model as videoModel"); // 按分镜id分组,聚合资产提示词 @@ -44,7 +43,7 @@ export default router.post( const videoModel = await u.db("o_project").where("id", projectId).select("videoModel").first(); model = videoModel?.videoModel || ""; } - if (!model) return res.status(400).json({ error: "未找到视频模型,请检查项目配置" }); + if (!model) continue; //分镜没有指定视频模型,且项目也没有默认视频模型,跳过生成提示词 const systemPrompt = `你是一个专业的${model}视频生成助手。请根据分镜提示词和关联资产提示词,生成一段完整的、可直接用于视频生成模型的中文提示词。`; const userContent = `分镜提示词:${prompt || "无"}\n资产提示词:${assetPrompts.length > 0 ? assetPrompts.join("\n") : "无"}`; diff --git a/src/types/database.d.ts b/src/types/database.d.ts index 99c6f71..9accb03 100644 --- a/src/types/database.d.ts +++ b/src/types/database.d.ts @@ -1,26 +1,62 @@ -<<<<<<< HEAD -// @db-hash 93b2462070c45c2b449e9a18c4e88763 +// @db-hash ea0c51ccb8c93a2f019139db9621721e //该文件由脚本自动生成,请勿手动修改 -======= -// @db-hash f7bc2fdb80756d5536929eb47155578b -//该文件由脚本自动生成,请勿手动修改 - -export interface _o_script_old_20260327 { - 'content'?: string | null; +export interface _o_project_old_20260330 { + 'artStyle'?: string | null; 'createTime'?: number | null; - 'id'?: number; + 'id'?: number | null; + 'intro'?: string | null; 'name'?: string | null; - 'projectId'?: number | null; + 'projectType'?: string | null; + 'type'?: string | null; + 'userId'?: number | null; + 'videoRatio'?: string | null; +} +export interface _o_storyboard_old_20260325 { + 'camera'?: string | null; + 'createTime'?: number | null; + 'description'?: string | null; + 'duration'?: string | null; + 'filePath'?: string | null; + 'frameMode'?: string | null; + 'id'?: number; + 'lines'?: string | null; + 'mode'?: string | null; + 'model'?: string | null; + 'prompt'?: string | null; + 'reason'?: string | null; + 'resolution'?: string | null; + 'scriptId'?: number | null; + 'sound'?: string | null; + 'state'?: string | null; + 'title'?: string | null; +} +export interface _o_storyboard_old_20260330 { + 'camera'?: string | null; + 'createTime'?: number | null; + 'description'?: string | null; + 'duration'?: string | null; + 'filePath'?: string | null; + 'frameMode'?: string | null; + 'id'?: number; + 'index'?: string | null; + 'lines'?: string | null; + 'mode'?: string | null; + 'model'?: string | null; + 'prompt'?: string | null; + 'reason'?: string | null; + 'resolution'?: string | null; + 'scriptId'?: number | null; + 'sound'?: string | null; + 'state'?: string | null; + 'title'?: string | null; } ->>>>>>> 9da2610cdedc1e293b351ed3ab67fbc6fcd989f1 export interface memories { 'content': string; 'createTime': number; 'embedding'?: string | null; 'id'?: string; 'isolationKey': string; - 'name'?: string | null; 'relatedMessageIds'?: string | null; 'role'?: string | null; 'summarized'?: number | null; @@ -141,8 +177,6 @@ export interface o_prompt { export interface o_script { 'content'?: string | null; 'createTime'?: number | null; - 'errorReason'?: string | null; - 'extractState'?: number | null; 'id'?: number; 'name'?: string | null; 'projectId'?: number | null; @@ -190,6 +224,7 @@ export interface o_storyboard { 'sound'?: string | null; 'state'?: string | null; 'title'?: string | null; + 'videoPrompt'?: string | null; } export interface o_tasks { 'describe'?: string | null; @@ -244,10 +279,9 @@ export interface o_videoConfig { } export interface DB { -<<<<<<< HEAD -======= - "_o_script_old_20260327": _o_script_old_20260327; ->>>>>>> 9da2610cdedc1e293b351ed3ab67fbc6fcd989f1 + "_o_project_old_20260330": _o_project_old_20260330; + "_o_storyboard_old_20260325": _o_storyboard_old_20260325; + "_o_storyboard_old_20260330": _o_storyboard_old_20260330; "memories": memories; "o_agentDeploy": o_agentDeploy; "o_agentWorkData": o_agentWorkData;