mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-17 13:43:42 +08:00
🔖 chore: rename incorrect variable names
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user