Merge branch 'feat-cjy-report' into dev
This commit is contained in:
commit
637b12d90f
@ -70,9 +70,9 @@ func VL(videoURLs []string, imageURLs []string, text string, model string) (resp
|
|||||||
|
|
||||||
// 发送请求,使用PostBytesHeader获取状态码和响应体
|
// 发送请求,使用PostBytesHeader获取状态码和响应体
|
||||||
statusCode, body, err := utils.PostBytesHeader(modelQwen.DashscopeVLURL, map[string]interface{}{
|
statusCode, body, err := utils.PostBytesHeader(modelQwen.DashscopeVLURL, map[string]interface{}{
|
||||||
"Authorization": "Bearer " + modelQwen.DashscopeAPIKey,
|
"Authorization": "Bearer " + modelQwen.DashscopeAPIKey,
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
"X-DashScope-OssResourceResolve": "enable", // 启用OSS资源解析
|
// "X-DashScope-OssResourceResolve": "enable", // 启用OSS资源解析
|
||||||
}, jsonData)
|
}, jsonData)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
zap.L().Error("VL Post failed", zap.Error(err))
|
zap.L().Error("VL Post failed", zap.Error(err))
|
||||||
|
|||||||
@ -45,7 +45,7 @@ func AIVideoVL(ctx *gin.Context) {
|
|||||||
// 检查是否是文件下载超时错误(内容过大)
|
// 检查是否是文件下载超时错误(内容过大)
|
||||||
errMsg := err.Error()
|
errMsg := err.Error()
|
||||||
if contains(errMsg, "Download multimodal file timed out") || contains(errMsg, "timed out") {
|
if contains(errMsg, "Download multimodal file timed out") || contains(errMsg, "timed out") {
|
||||||
service.Error(ctx, errors.New("报错内容过大,请重新选择"))
|
service.Error(ctx, errors.New("内容过大,请重新选择"))
|
||||||
} else {
|
} else {
|
||||||
service.Error(ctx, errors.New("ai分析帖子内容失败"))
|
service.Error(ctx, errors.New("ai分析帖子内容失败"))
|
||||||
}
|
}
|
||||||
@ -107,7 +107,7 @@ func AICompetitorReport(ctx *gin.Context) {
|
|||||||
// 检查是否是文件下载超时错误(内容过大)
|
// 检查是否是文件下载超时错误(内容过大)
|
||||||
errMsg := err.Error()
|
errMsg := err.Error()
|
||||||
if contains(errMsg, "Download multimodal file timed out") || contains(errMsg, "timed out") {
|
if contains(errMsg, "Download multimodal file timed out") || contains(errMsg, "timed out") {
|
||||||
service.Error(ctx, errors.New("报错内容过大,请重新选择"))
|
service.Error(ctx, errors.New("内容过大,请重新选择"))
|
||||||
} else {
|
} else {
|
||||||
service.Error(ctx, fmt.Errorf("AI理解视频图片失败: %v", err))
|
service.Error(ctx, fmt.Errorf("AI理解视频图片失败: %v", err))
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user