feat: add general video generation workflow

This commit is contained in:
xuejianwu
2026-08-05 17:59:38 +08:00
parent 8c044424c4
commit e53d21a819
6 changed files with 494 additions and 13 deletions

View File

@@ -560,8 +560,8 @@ function buildVideoPayload(body) {
const extraImageReferences = Array.isArray(body.extraImageReferences) ? body.extraImageReferences : [];
const videoReferences = Array.isArray(body.videoReferences) ? body.videoReferences : [];
const imageReferences = [...assetReferences, ...extraImageReferences];
if (assetReferences.length < 1 || assetReferences.some((item) => !/^asset:\/\/(?:mat_|asset-)/i.test(item))) {
throw new ClientError("请先选择审核通过的人物素材(asset://...");
if (assetReferences.some((item) => !/^asset:\/\/(?:mat_|asset-)/i.test(item))) {
throw new ClientError("人物素材必须是审核通过的 asset:// 引用");
}
if (imageReferences.length > 9) {
throw new ClientError(`人物图片与其他参考图片合计最多 9 张,当前为 ${imageReferences.length}`);