|
|
@@ -78,12 +78,15 @@ func RerankHelper(c *gin.Context, relayMode int) (openaiErr *dto.OpenAIErrorWith
|
|
|
return service.OpenAIErrorWrapperLocal(err, "json_marshal_failed", http.StatusInternalServerError)
|
|
|
}
|
|
|
requestBody := bytes.NewBuffer(jsonData)
|
|
|
- statusCodeMappingStr := c.GetString("status_code_mapping")
|
|
|
+ if common.DebugEnabled {
|
|
|
+ println(fmt.Sprintf("Rerank request body: %s", requestBody.String()))
|
|
|
+ }
|
|
|
resp, err := adaptor.DoRequest(c, relayInfo, requestBody)
|
|
|
if err != nil {
|
|
|
return service.OpenAIErrorWrapper(err, "do_request_failed", http.StatusInternalServerError)
|
|
|
}
|
|
|
|
|
|
+ statusCodeMappingStr := c.GetString("status_code_mapping")
|
|
|
var httpResp *http.Response
|
|
|
if resp != nil {
|
|
|
httpResp = resp.(*http.Response)
|