fix(ai): 规划提示词补回用户要求——指令此前从未发送给模型
严重回归:PR #3 重写提示词时遗漏了「用户要求」段落,instruction 参数 从未写入提示词。模型只看到项目数据与规则,只能从对话历史里间接 推断用户意图,导致大量「未收到具体的中文剪辑要求」空方案。 本次把用户指令以独立段落写回提示词,并加测试断言指令必须出现。
This commit is contained in:
1 parent
d71f9e57c6
commit
de12d3ba9e
2 files changed
+5
No files matched your search
@@ -39,6 +39,8 @@ test('规划提示词:按评分筛选片段、丢弃占位描述、区分新
|
||||
]}});
|
||||
const p={settings:{width:1920,height:1080,fps:30},media:[mk('a',90),mk('b',40)],clips:[{id:'c1',mediaId:'a',track:'video',start:0,in:0,out:5,speed:1,volume:1,motion:[{time:0,zoom:1,x:.5,y:.5}],text:'旧字幕'}]};
|
||||
const fresh=plannerPrompt(p,'制作一个旅行短片',{fresh:true,target:45,style:getStyle('cinematic'),budget:9000});
|
||||
assert.ok(fresh.includes('用户本次要求'));
|
||||
assert.ok(fresh.includes('制作一个旅行短片'),'用户指令必须出现在提示词中');
|
||||
assert.ok(fresh.includes('海滩日落'));
|
||||
assert.ok(fresh.includes('城市夜景'));
|
||||
assert.ok(!fresh.includes('尚未进行语义或动作识别'));
|
||||
|
||||
Reference in new issue
Block a user