mirror of
https://github.com/linux-do/new-api.git
synced 2025-11-09 23:53:41 +08:00
fix: try to fix 307
This commit is contained in:
@@ -162,7 +162,7 @@ func TextHelper(c *gin.Context) *dto.OpenAIErrorWithStatusCode {
|
||||
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
returnPreConsumedQuota(c, relayInfo.TokenId, userQuota, preConsumedQuota)
|
||||
return service.RelayErrorHandler(resp)
|
||||
return service.OpenAIErrorWrapper(fmt.Errorf("bad response status code: %d", resp.StatusCode), "bad_response_status_code", resp.StatusCode)
|
||||
}
|
||||
|
||||
usage, openaiErr, sensitiveResp := adaptor.DoResponse(c, resp, relayInfo)
|
||||
|
||||
Reference in New Issue
Block a user