From ab8a56848fd03a48b7006ff60724644a27a24ea4 Mon Sep 17 00:00:00 2001 From: zijiren233 Date: Sun, 14 Jul 2024 10:16:59 +0800 Subject: [PATCH] fix: stream need query alt=sse --- relay/adaptor/vertexai/adaptor.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/relay/adaptor/vertexai/adaptor.go b/relay/adaptor/vertexai/adaptor.go index 68d2e875..3fab4a45 100644 --- a/relay/adaptor/vertexai/adaptor.go +++ b/relay/adaptor/vertexai/adaptor.go @@ -63,13 +63,13 @@ func (a *Adaptor) GetRequestURL(meta *meta.Meta) (string, error) { suffix := "" if strings.HasPrefix(meta.ActualModelName, "gemini") { if meta.IsStream { - suffix = "streamGenerateContent" + suffix = "streamGenerateContent?alt=sse" } else { suffix = "generateContent" } } else { if meta.IsStream { - suffix = "streamRawPredict" + suffix = "streamRawPredict?alt=sse" } else { suffix = "rawPredict" }