feat(adaptor): 新适配百炼多种图片生成模型

- wan2.6系列生图与编辑,适配多图生成计费
- wan2.5系列生图与编辑
- z-image-turbo生图,适配prompt_extend计费
This commit is contained in:
CaIon
2025-12-29 22:58:32 +08:00
parent 8063897998
commit 48d358faec
16 changed files with 336 additions and 155 deletions

View File

@@ -124,12 +124,18 @@ func ImageHelper(c *gin.Context, info *relaycommon.RelayInfo) (newAPIError *type
quality = "hd"
}
var logContent string
var logContent []string
if len(request.Size) > 0 {
logContent = fmt.Sprintf("大小 %s, 品质 %s, 张数 %d", request.Size, quality, request.N)
logContent = append(logContent, fmt.Sprintf("大小 %s", request.Size))
}
if len(quality) > 0 {
logContent = append(logContent, fmt.Sprintf("品质 %s", quality))
}
if request.N > 0 {
logContent = append(logContent, fmt.Sprintf("生成数量 %d", request.N))
}
postConsumeQuota(c, info, usage.(*dto.Usage), logContent)
postConsumeQuota(c, info, usage.(*dto.Usage), logContent...)
return nil
}