This commit is contained in:
laodaming 2023-10-25 14:54:41 +08:00
parent 6430c18d2a
commit 735098b2c7

View File

@ -36,7 +36,7 @@ func (l *TestAiLogic) TestAi(req *types.TestAiReq, userinfo *auth.UserInfo, w ht
if lenAiHost == 0 { if lenAiHost == 0 {
return resp.SetStatusWithMessage(basic.CodeServiceErr, "ai host list is 0") return resp.SetStatusWithMessage(basic.CodeServiceErr, "ai host list is 0")
} }
hostIndex := rand.Intn(lenAiHost) - 1 hostIndex := rand.Intn(lenAiHost)
var resultBLM constants.BLMServiceUrlResult var resultBLM constants.BLMServiceUrlResult
logx.Info("正在请求:" + l.svcCtx.Config.BLMService.Urls[hostIndex]) logx.Info("正在请求:" + l.svcCtx.Config.BLMService.Urls[hostIndex])
err := curl.NewClient(l.ctx, &curl.Config{ err := curl.NewClient(l.ctx, &curl.Config{