add transcriptions api

This commit is contained in:
Martial BE
2023-12-01 10:54:07 +08:00
parent 7c6dee7390
commit a013b1a166
18 changed files with 304 additions and 24 deletions

View File

@@ -151,6 +151,8 @@ func (p *AliProvider) streamResponseAli2OpenAI(aliResponse *AliChatResponse) *ty
// 发送流请求
func (p *AliProvider) sendStreamRequest(req *http.Request) (usage *types.Usage, errWithCode *types.OpenAIErrorWithStatusCode) {
defer req.Body.Close()
usage = &types.Usage{}
// 发送请求
resp, err := common.HttpClient.Do(req)