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

@@ -128,6 +128,8 @@ func (p *PalmProvider) streamResponsePaLM2OpenAI(palmResponse *PaLMChatResponse)
}
func (p *PalmProvider) sendStreamRequest(req *http.Request) (*types.OpenAIErrorWithStatusCode, string) {
defer req.Body.Close()
// 发送请求
resp, err := common.HttpClient.Do(req)
if err != nil {