Merge branch 'songquanpeng' into sync_upstream

This commit is contained in:
Martial BE
2023-12-21 15:36:01 +08:00
41 changed files with 1045 additions and 89 deletions

View File

@@ -46,6 +46,14 @@ func (p *XunfeiProvider) sendRequest(request *types.ChatCompletionRequest, authU
}
}
if len(xunfeiResponse.Payload.Choices.Text) == 0 {
xunfeiResponse.Payload.Choices.Text = []XunfeiChatResponseTextItem{
{
Content: "",
},
}
}
xunfeiResponse.Payload.Choices.Text[0].Content = content
response := p.responseXunfei2OpenAI(&xunfeiResponse)