更新绘图和视频生成提示词字段长度限制,优化图生图逻辑,统一转成base64 的格式发送到远程 API

This commit is contained in:
RockYang
2025-02-26 16:06:19 +08:00
parent 6e2deeed87
commit 8a4596b36a
10 changed files with 82 additions and 60 deletions

View File

@@ -18,9 +18,10 @@ import (
"geekai/store/vo"
"geekai/utils"
"geekai/utils/resp"
"time"
"github.com/gin-gonic/gin"
"gorm.io/gorm"
"time"
)
type VideoHandler struct {
@@ -61,10 +62,6 @@ func (h *VideoHandler) LumaCreate(c *gin.Context) {
resp.ERROR(c, "prompt is needed")
return
}
if len(data.Prompt) > 2000 {
resp.ERROR(c, "提示词太长,请删减提示词。")
return
}
user, err := h.GetLoginUser(c)
if err != nil {
@@ -160,10 +157,6 @@ func (h *VideoHandler) KeLingCreate(c *gin.Context) {
resp.ERROR(c, "prompt is needed")
return
}
if len(data.Prompt) > 2000 {
resp.ERROR(c, "提示词太长,请删减提示词。")
return
}
userId := int(h.GetLoginUserId(c))
params := types.KeLingVideoParams{