限制绘画提示词长度,修复移动端角色和模型绑定失败问题

This commit is contained in:
RockYang
2025-02-23 06:56:38 +08:00
parent 63fd125439
commit a3f0576535
17 changed files with 91 additions and 17 deletions

View File

@@ -91,6 +91,11 @@ func (h *MidJourneyHandler) Image(c *gin.Context) {
return
}
if len(data.Prompt) > 2000 {
resp.ERROR(c, "提示词太长,请删减提示词。")
return
}
var params = ""
if data.Rate != "" && !strings.Contains(params, "--ar") {
params += " --ar " + data.Rate