fix: hunyuan

This commit is contained in:
CalciumIon
2024-07-08 23:42:16 +08:00
parent a075598757
commit b75134ece4
6 changed files with 56 additions and 44 deletions

View File

@@ -38,6 +38,7 @@ func RelayErrorHandler(resp *http.Response) (OpenAIErrorWithStatusCode *dto.Open
var textResponse dto.TextResponseWithError
err = json.Unmarshal(responseBody, &textResponse)
if err != nil {
OpenAIErrorWithStatusCode.Error.Message = fmt.Sprintf("error unmarshalling response body: %s", responseBody)
return
}
OpenAIErrorWithStatusCode.Error = textResponse.Error