mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-17 13:43:42 +08:00
🔖 chore: Remove invalid code
This commit is contained in:
@@ -59,7 +59,7 @@ func errorHandle(minimaxError *BaseResp) *types.OpenAIError {
|
||||
}
|
||||
}
|
||||
|
||||
func (p *MiniMaxProvider) GetFullRequestURL(requestURL string, modelName string) string {
|
||||
func (p *MiniMaxProvider) GetFullRequestURL(requestURL string) string {
|
||||
baseURL := strings.TrimSuffix(p.GetBaseURL(), "/")
|
||||
keys := strings.Split(p.Channel.Key, "|")
|
||||
if len(keys) != 2 {
|
||||
|
||||
@@ -62,7 +62,7 @@ func (p *MiniMaxProvider) getChatRequest(request *types.ChatCompletionRequest) (
|
||||
}
|
||||
|
||||
// 获取请求地址
|
||||
fullRequestURL := p.GetFullRequestURL(url, request.Model)
|
||||
fullRequestURL := p.GetFullRequestURL(url)
|
||||
if fullRequestURL == "" {
|
||||
return nil, common.ErrorWrapper(errors.New("API KEY is filled in incorrectly"), "invalid_minimax_config", http.StatusInternalServerError)
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ func (p *MiniMaxProvider) CreateEmbeddings(request *types.EmbeddingRequest) (*ty
|
||||
return nil, errWithCode
|
||||
}
|
||||
// 获取请求地址
|
||||
fullRequestURL := p.GetFullRequestURL(url, request.Model)
|
||||
fullRequestURL := p.GetFullRequestURL(url)
|
||||
if fullRequestURL == "" {
|
||||
return nil, common.ErrorWrapper(nil, "invalid_minimax_config", http.StatusInternalServerError)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user