🔖 chore: rename incorrect variable names

This commit is contained in:
MartialBE
2024-05-29 12:27:32 +08:00
parent c2f8a79be2
commit 23f7dd0612
19 changed files with 84 additions and 84 deletions

View File

@@ -120,10 +120,10 @@ func ConvertFromChatOpenai(request *types.ChatCompletionRequest) (*CohereRequest
}
func ConvertToChatOpenai(provider base.ProviderInterface, response *CohereResponse, request *types.ChatCompletionRequest) (openaiResponse *types.ChatCompletionResponse, errWithCode *types.OpenAIErrorWithStatusCode) {
error := errorHandle(&response.CohereError)
if error != nil {
aiError := errorHandle(&response.CohereError)
if aiError != nil {
errWithCode = &types.OpenAIErrorWithStatusCode{
OpenAIError: *error,
OpenAIError: *aiError,
StatusCode: http.StatusBadRequest,
}
return