From b870e2060f1c8215d8072df7e5231a25a9a5a7f3 Mon Sep 17 00:00:00 2001 From: zhishi <1951671751@qq.com> Date: Fri, 1 May 2026 20:17:04 +0800 Subject: [PATCH] no message --- data/vendor/toonflow.ts | 2 +- .../workbench/generateVideoPrompt.ts | 16 +++++++++++--- src/types/database.d.ts | 21 +++++++++++++++++-- 3 files changed, 33 insertions(+), 6 deletions(-) diff --git a/data/vendor/toonflow.ts b/data/vendor/toonflow.ts index 3c5e1f7..3065d0d 100644 --- a/data/vendor/toonflow.ts +++ b/data/vendor/toonflow.ts @@ -139,7 +139,7 @@ const vendor: VendorConfig = { description: "## Toonflow官方中转平台\n\nToonflow官方中转平台,提供**文本、图像、视频、音频**等多模态生成能力的中转服务,支持接入多个大模型供应商,方便用户统一管理和调用不同供应商的生成能力。\n\n🔗 [前往中转平台](https://api.toonflow.net/)\n\n如果这个项目对你有帮助,可以考虑支持一下我们的开发工作 ☕", icon: "", - inputs: [{ key: "apiKey", label: "API密钥", type: "password", required: true }], + inputs: [{ key: "apiKey", label: "API密钥", type: "password", required: true },{ key: "baseUrl", label: "API密钥", type: "password", required: true }], inputValues: { apiKey: "", baseUrl: "https://api.toonflow.net/v1", diff --git a/src/routes/production/workbench/generateVideoPrompt.ts b/src/routes/production/workbench/generateVideoPrompt.ts index b12e4eb..26fdc0a 100644 --- a/src/routes/production/workbench/generateVideoPrompt.ts +++ b/src/routes/production/workbench/generateVideoPrompt.ts @@ -81,12 +81,21 @@ export default router.post( shouldGenerateImage: item.shouldGenerateImage, }); } - const assetsNotAudioIds = assets.filter((i) => i.type != "audio").map((i) => i.id); - const assets2Audio = await u.db("o_assetsRole2Audio").whereIn("assetsRoleId", assetsNotAudioIds); + const assetsNotAudioIds = assets.filter((i) => i.type == "audio").map((i) => i.id); + console.log("%c Line:85 🧀 assetsNotAudioIds", "background:#3f7cff", assetsNotAudioIds); + + const assets2Audio = await u + .db("o_assets") + .whereIn("o_assets.id", assetsNotAudioIds) + .join("o_assetsRole2Audio", "o_assetsRole2Audio.assetsAudioId", "o_assets.assetsId") + .select("o_assets.assetsId", "o_assets.id", "o_assetsRole2Audio.assetsAudioId", "o_assetsRole2Audio.assetsRoleId"); + console.log("%c Line:88 🌶 assets2Audio", "background:#2eafb0", assets2Audio); + const assetsAudioRecord: Record = {}; assets2Audio.forEach((i) => { - assetsAudioRecord[i.assetsRoleId!] = i.assetsAudioId!; + assetsAudioRecord[i.assetsRoleId!] = i.id!; }); + 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(); @@ -158,6 +167,7 @@ export default router.post( >`, )}, `; + console.log("%c Line:158 🍪 content", "background:#4fff4B", content); try { const { text } = await u.Ai.Text("universalAi").invoke({ diff --git a/src/types/database.d.ts b/src/types/database.d.ts index cfc2598..52cf62a 100644 --- a/src/types/database.d.ts +++ b/src/types/database.d.ts @@ -1,6 +1,22 @@ -// @db-hash 46c86c97b2ffc399387f42c5b7c014eb +// @db-hash 17b50430f27f3b720ad137e6c30cc477 //该文件由脚本自动生成,请勿手动修改 +export interface _o_assets_old_20260428 { + 'assetsId'?: number | null; + 'describe'?: string | null; + 'flowId'?: number | null; + 'id'?: number; + 'imageId'?: number | null; + 'name'?: string | null; + 'projectId'?: number | null; + 'prompt'?: string | null; + 'promptErrorReason'?: string | null; + 'promptState'?: string | null; + 'remark'?: string | null; + 'scriptId'?: number | null; + 'startTime'?: number | null; + 'type'?: string | null; +} export interface memories { 'content': string; 'createTime': number; @@ -23,7 +39,6 @@ export interface o_agentDeploy { 'modelName'?: string | null; 'name'?: string | null; 'temperature'?: number | null; - 'topP'?: number | null; 'type'?: string | null; 'vendorId'?: string | null; } @@ -214,6 +229,7 @@ export interface o_user { 'password'?: string | null; } export interface o_vendorConfig { + 'code'?: string | null; 'enable'?: number | null; 'id'?: string; 'inputValues'?: string | null; @@ -242,6 +258,7 @@ export interface o_videoTrack { } export interface DB { + "_o_assets_old_20260428": _o_assets_old_20260428; "memories": memories; "o_agentDeploy": o_agentDeploy; "o_agentWorkData": o_agentWorkData;