🔖 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

@@ -63,7 +63,7 @@ func (p *XunfeiProvider) GetRequestHeaders() (headers map[string]string) {
}
// 获取完整请求 URL
func (p *XunfeiProvider) GetFullRequestURL(requestURL string, modelName string) string {
func (p *XunfeiProvider) GetFullRequestURL(modelName string) string {
splits := strings.Split(p.Channel.Key, "|")
if len(splits) != 3 {
return ""

View File

@@ -60,12 +60,12 @@ func (p *XunfeiProvider) CreateChatCompletionStream(request *types.ChatCompletio
}
func (p *XunfeiProvider) getChatRequest(request *types.ChatCompletionRequest) (*websocket.Conn, *types.OpenAIErrorWithStatusCode) {
url, errWithCode := p.GetSupportedAPIUri(config.RelayModeChatCompletions)
_, errWithCode := p.GetSupportedAPIUri(config.RelayModeChatCompletions)
if errWithCode != nil {
return nil, errWithCode
}
authUrl := p.GetFullRequestURL(url, request.Model)
authUrl := p.GetFullRequestURL(request.Model)
wsConn, err := p.wsRequester.NewRequest(authUrl, nil)
if err != nil {