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