fix: fix SensitiveWords error

This commit is contained in:
CaIon committed 2024-03-21 14:29:56 +08:00
1 parent 8b96117839
commit a5088f5e23
4 files changed
+22 -12

No files matched your search

+2 -2
View File
@@ -35,12 +35,12 @@ func RelayErrorHandler(resp *http.Response) (OpenAIErrorWithStatusCode *dto.Open
if err != nil {
return
}
var textResponse dto.TextResponse
var textResponse dto.TextResponseWithError
err = json.Unmarshal(responseBody, &textResponse)
if err != nil {
return
}
OpenAIErrorWithStatusCode.Error = *textResponse.Error
OpenAIErrorWithStatusCode.Error = textResponse.Error
return
}