From 735098b2c748651e117aea497c4dca3c57fa9781 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Wed, 25 Oct 2023 14:54:41 +0800 Subject: [PATCH] fix --- server/collection/internal/logic/testailogic.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/collection/internal/logic/testailogic.go b/server/collection/internal/logic/testailogic.go index 75bf2a41..aaa82bad 100644 --- a/server/collection/internal/logic/testailogic.go +++ b/server/collection/internal/logic/testailogic.go @@ -36,7 +36,7 @@ func (l *TestAiLogic) TestAi(req *types.TestAiReq, userinfo *auth.UserInfo, w ht if lenAiHost == 0 { return resp.SetStatusWithMessage(basic.CodeServiceErr, "ai host list is 0") } - hostIndex := rand.Intn(lenAiHost) - 1 + hostIndex := rand.Intn(lenAiHost) var resultBLM constants.BLMServiceUrlResult logx.Info("正在请求:" + l.svcCtx.Config.BLMService.Urls[hostIndex]) err := curl.NewClient(l.ctx, &curl.Config{