feat(gateway): sync Seedance 2.0 capabilities
This commit is contained in:
@@ -336,6 +336,16 @@ func addVolcesVideoTaskParams(out map[string]any, body map[string]any) {
|
||||
copyVolcesBoolParam(out, "return_last_frame", body, "return_last_frame", "returnLastFrame")
|
||||
copyVolcesIntParam(out, "execution_expires_after", body, "execution_expires_after", "executionExpiresAfter")
|
||||
copyVolcesBoolParam(out, "generate_audio", body, "generate_audio", "generateAudio", "audio")
|
||||
if tools, ok := body["tools"]; ok {
|
||||
out["tools"] = tools
|
||||
} else {
|
||||
for _, key := range []string{"enable_web_search", "enableWebSearch"} {
|
||||
if value, ok := volcesBoolFromAny(body[key]); ok && value {
|
||||
out["tools"] = []any{map[string]any{"type": "web_search"}}
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
copyVolcesBoolParam(out, "draft", body, "draft")
|
||||
copyVolcesStringParam(out, "resolution", body, "resolution", "size")
|
||||
copyVolcesStringParam(out, "ratio", body, "ratio", "aspect_ratio", "aspectRatio")
|
||||
|
||||
Reference in New Issue
Block a user