From 1064bf77c853e6ea655e3bedc1522ab27d7cdc1f Mon Sep 17 00:00:00 2001 From: zhishi <1951671751@qq.com> Date: Fri, 27 Mar 2026 02:00:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=AB=A0=E8=8A=82ID=E6=98=8E?= =?UTF-8?q?=E7=A1=AE=E6=A0=87=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/agents/scriptAgent/index.ts | 4 ++-- src/agents/scriptAgent/tools.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/agents/scriptAgent/index.ts b/src/agents/scriptAgent/index.ts index e507e7f..0f727bd 100644 --- a/src/agents/scriptAgent/index.ts +++ b/src/agents/scriptAgent/index.ts @@ -47,6 +47,7 @@ export async function decisionAI(ctx: AgentContext) { const projectData = await u.db("o_project").where("id", resTool.data.projectId).first(); const novelData = await u.db("o_novel").where("projectId", resTool.data.projectId).select("id", "chapterIndex as index"); + console.log("%c Line:50 🥒 novelData", "background:#2eafb0", novelData); const projectInfo = [ "## 项目信息", @@ -57,7 +58,7 @@ export async function decisionAI(ctx: AgentContext) { `目标改编视频画幅:${projectData?.videoRatio ?? "16:9"}`, ].join("\n"); - const prefixSystem = `${projectInfo}\n\n## 章节ID映射表\n${novelData.map((i: any) => `- ${i.id}: 第${i.index}章`).join("\n")}\n\n`; + const prefixSystem = `${projectInfo}\n\n## 章节ID映射表\n${novelData.map((i: any) => `- 章节ID:${i.id}: 第${i.index}章`).join("\n")}\n\n`; const { textStream } = await u.Ai.Text("scriptAgent").stream({ system: prefixSystem + systemPrompt, @@ -152,7 +153,6 @@ function runSubAgent(parentCtx: AgentContext) { let fullResponse = ""; for await (const chunk of subTextStream) { - console.log("%c Line:155 🥛 chunk", "background:#fca650", chunk); msg.send(chunk); fullResponse += chunk; } diff --git a/src/agents/scriptAgent/tools.ts b/src/agents/scriptAgent/tools.ts index 420416e..f05d736 100644 --- a/src/agents/scriptAgent/tools.ts +++ b/src/agents/scriptAgent/tools.ts @@ -35,7 +35,7 @@ export default (resTool: ResTool, toolsNames?: string[]) => { get_novel_events: tool({ description: "获取章节事件", inputSchema: z.object({ - ids: z.array(z.number()).describe("章节id"), + ids: z.array(z.number()).describe("章节id,注意区分"), }), execute: async ({ ids }) => { resTool.systemMessage(`正在阅读 章节事件 数据...`);