mirror of
https://github.com/yangjian102621/geekai.git
synced 2026-02-10 00:14:29 +08:00
限制绘画提示词长度,修复移动端角色和模型绑定失败问题
This commit is contained in:
@@ -102,6 +102,10 @@ func (h *SdJobHandler) Image(c *gin.Context) {
|
||||
if data.Sampler == "" {
|
||||
data.Sampler = "Euler a"
|
||||
}
|
||||
if len(data.Prompt) > 2000 {
|
||||
resp.ERROR(c, "提示词太长,请删减提示词。")
|
||||
return
|
||||
}
|
||||
idValue, _ := c.Get(types.LoginUserID)
|
||||
userId := utils.IntValue(utils.InterfaceToString(idValue), 0)
|
||||
taskId, err := h.snowflake.Next(true)
|
||||
|
||||
Reference in New Issue
Block a user