feat: support plugin for ali channel (close #797)

This commit is contained in:
JustSong
2023-12-10 17:22:52 +08:00
parent 01f7b0186f
commit 379074f7d0
3 changed files with 19 additions and 0 deletions

View File

@@ -360,6 +360,9 @@ func relayTextHelper(c *gin.Context, relayMode int) *OpenAIErrorWithStatusCode {
if textRequest.Stream {
req.Header.Set("X-DashScope-SSE", "enable")
}
if c.GetString("plugin") != "" {
req.Header.Set("X-DashScope-Plugin", c.GetString("plugin"))
}
case APITypeTencent:
req.Header.Set("Authorization", apiKey)
case APITypePaLM: