fix: 重试成功后清空执行记录中的旧报错信息

This commit is contained in:
2026-08-21 10:56:31 +08:00
parent cef837a35c
commit 9bc388018b
5 changed files with 62 additions and 1 deletions
@@ -51,8 +51,14 @@ func ScriptTranscribeLambda(ctx context.Context, input any) (any, error) {
}
var totalDuration int
var modelId int64
// 静音模式:清空镜头台词/旁白,生成视频不含口播、旁白、字幕与人物开口动作,默认开启
noSpeech := true
for _, item := range *n {
switch item.Field {
case "noSpeech":
if !g.IsEmpty(item.Value) {
noSpeech = gconv.Bool(item.Value)
}
case "totalDuration":
if !g.IsEmpty(item.Value) {
totalDuration = gconv.Int(item.Value)
@@ -136,6 +142,14 @@ func ScriptTranscribeLambda(ctx context.Context, input any) (any, error) {
if err != nil {
return nil, err
}
// 静音模式:清空台词与旁白,保证写进视频 prompt 的只有事件/环境音/运镜/景别,
// 视频模型不会产生口播、旁白配音、字幕烧录,也不会把角色标记为开口优先做口型动画
if noSpeech {
for i := range shots {
shots[i].Dialogue = ""
shots[i].Narration = ""
}
}
// 5. 产出固定结构 {"shots": [...]}
var arr []any