流模式 v1beta/models/gemini-2.0-flash:streamGenerateContent?alt=sse&key=xxx
(c *gin.Context, relayInfo *relaycommon.RelayInfo)
| 35 | // 流模式 |
| 36 | // /v1beta/models/gemini-2.0-flash:streamGenerateContent?alt=sse&key=xxx |
| 37 | func checkGeminiStreamMode(c *gin.Context, relayInfo *relaycommon.RelayInfo) { |
| 38 | if c.Query("alt") == "sse" { |
| 39 | relayInfo.IsStream = true |
| 40 | } |
| 41 | |
| 42 | // if strings.Contains(c.Request.URL.Path, "streamGenerateContent") { |
| 43 | // relayInfo.IsStream = true |
| 44 | // } |
| 45 | } |
| 46 | |
| 47 | func checkGeminiInputSensitive(textRequest *gemini.GeminiChatRequest) ([]string, error) { |
| 48 | var inputTexts []string |