This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"smart-search-back/pkg/errors"
|
||||
"git.techease.ru/Smart-search/smart-search-back/pkg/errors"
|
||||
)
|
||||
|
||||
type OpenAIClient struct {
|
||||
@@ -122,7 +122,7 @@ func (c *OpenAIClient) GenerateTZ(requestTxt string) (string, error) {
|
||||
if err != nil {
|
||||
return "", errors.NewInternalError(errors.AIAPIError, "failed to send request", err)
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
defer func() { _ = resp.Body.Close() }()
|
||||
|
||||
body, err := io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user