From 310ed76b186acaa558db30703e0bce91e18d0a72 Mon Sep 17 00:00:00 2001 From: Raven95676 Date: Sun, 13 Apr 2025 17:28:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BB=85=E5=9C=A8=E7=A1=AE=E5=AE=9E?= =?UTF-8?q?=E5=8C=85=E5=90=AB=E5=9B=BE=E7=89=87=E6=A8=A1=E6=80=81=E6=97=B6?= =?UTF-8?q?=E9=99=8D=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astrbot/core/provider/sources/gemini_source.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/astrbot/core/provider/sources/gemini_source.py b/astrbot/core/provider/sources/gemini_source.py index 905289987..ab312e502 100644 --- a/astrbot/core/provider/sources/gemini_source.py +++ b/astrbot/core/provider/sources/gemini_source.py @@ -121,7 +121,10 @@ class ProviderGoogleGenAI(Provider): modalities = ["Text"] # 流式输出不支持图片模态 - if self.provider_settings.get("streaming_response", False): + if ( + self.provider_settings.get("streaming_response", False) + and "Image" in modalities + ): logger.warning("流式输出不支持图片模态,已自动降级为文本模态") modalities = ["Text"]