(content: Optional[GeminiContent])
| 246 | |
| 247 | |
| 248 | def _extract_text_from_gemini_content(content: Optional[GeminiContent]) -> str: |
| 249 | if content is None: |
| 250 | return "" |
| 251 | text_parts = [part.text.strip() for part in content.parts if part.text] |
| 252 | return "\n".join(part for part in text_parts if part).strip() |
| 253 | |
| 254 | |
| 255 | def _should_ignore_media_system_instruction(system_instruction: str) -> bool: |
no outgoing calls
no test coverage detected