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:
@@ -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 ""
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user