From 249f225045e79b8bc07ada766e13936d428b4c20 Mon Sep 17 00:00:00 2001 From: taylorxie Date: Tue, 10 Mar 2026 14:27:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=94=99=E8=AF=AF=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- maubot_llmplus/thrid_platform.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/maubot_llmplus/thrid_platform.py b/maubot_llmplus/thrid_platform.py index 876080d..ff43476 100644 --- a/maubot_llmplus/thrid_platform.py +++ b/maubot_llmplus/thrid_platform.py @@ -1,5 +1,6 @@ import asyncio import json +import logging from collections import deque from typing import List @@ -410,7 +411,11 @@ class Gemini(Platform): text = part.get("text", "") if text: yield text - if candidate.get("finishReason"): + finish_reason = candidate.get("finishReason") + if finish_reason: + logging.getLogger("instance/aibot").debug( + f"Gemini stream finished: finishReason={finish_reason}" + ) break except json.JSONDecodeError: pass