🔖 chore: Remove invalid code

This commit is contained in:
MartialBE
2024-05-29 04:38:56 +08:00
parent b5a4283b28
commit 021f8c65da
43 changed files with 46 additions and 341 deletions

View File

@@ -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 {

View File

@@ -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)
}

View File

@@ -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)
}