diff --git a/internal/service/recognition_service.go b/internal/service/recognition_service.go index 024acac..e8a6642 100644 --- a/internal/service/recognition_service.go +++ b/internal/service/recognition_service.go @@ -283,7 +283,7 @@ func (s *RecognitionService) processFormulaTask(ctx context.Context, taskID int6 headers := map[string]string{"Content-Type": "application/json", utils.RequestIDHeaderKey: utils.GetRequestIDFromContext(ctx)} // 发送请求时会使用带超时的context - resp, err := s.httpClient.RequestWithRetry(ctx, http.MethodPost, "https://cloud.texpixel.com:10443/formula/predict", bytes.NewReader(jsonData), headers) + resp, err := s.httpClient.RequestWithRetry(ctx, http.MethodPost, "https://cloud.texpixel.com:10443/vlm/formula/predict", bytes.NewReader(jsonData), headers) if err != nil { if ctx.Err() == context.DeadlineExceeded { log.Error(ctx, "func", "processFormulaTask", "msg", "请求超时") diff --git a/pkg/oss/policy.go b/pkg/oss/policy.go index 38375b2..0cfc4b3 100644 --- a/pkg/oss/policy.go +++ b/pkg/oss/policy.go @@ -124,7 +124,7 @@ func DownloadFile(ctx context.Context, ossPath string) (io.ReadCloser, error) { } // Create OSS client - client, err := oss.New(endpoint, config.GlobalConfig.Aliyun.OSS.AccessKeyID, config.GlobalConfig.Aliyun.OSS.AccessKeySecret) + client, err := oss.New(endpoint, config.GlobalConfig.Aliyun.OSS.AccessKeyID, config.GlobalConfig.Aliyun.OSS.AccessKeySecret, oss.UseCname(true)) if err != nil { log.Error(ctx, "func", "DownloadFile", "msg", "create oss client failed", "error", err) return nil, err