Skip to content

Commit f7e244e

Browse files
committed
fix(google/gemini): normalize falsy final_content to empty string to avoid None/empty responses
1 parent dd9e6a1 commit f7e244e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pipelines/google/google_gemini.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1758,7 +1758,7 @@ async def emit_chat_event(event_type: str, data: Dict[str, Any]) -> None:
17581758
</details>""".strip()
17591759
final_content = f"{details_block}{final_answer_text}"
17601760

1761-
if final_content is None:
1761+
if not final_content:
17621762
final_content = ""
17631763

17641764
# Ensure downstream consumers (UI, TTS) receive the complete response once streaming ends.

0 commit comments

Comments
 (0)