🐛 fix: fix panic caused by errors (#106)
This commit is contained in:
parent
113ed77bb9
commit
d941faac9f
@ -2,6 +2,7 @@ package minimax
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"net/http"
|
||||
"one-api/common"
|
||||
"one-api/common/requester"
|
||||
@ -62,7 +63,7 @@ func (p *MiniMaxProvider) getChatRequest(request *types.ChatCompletionRequest) (
|
||||
// 获取请求地址
|
||||
fullRequestURL := p.GetFullRequestURL(url, request.Model)
|
||||
if fullRequestURL == "" {
|
||||
return nil, common.ErrorWrapper(nil, "invalid_minimax_config", http.StatusInternalServerError)
|
||||
return nil, common.ErrorWrapper(errors.New("API KEY is filled in incorrectly"), "invalid_minimax_config", http.StatusInternalServerError)
|
||||
}
|
||||
|
||||
// 获取请求头
|
||||
|
Loading…
Reference in New Issue
Block a user