Remove internal code execution artifacts.
(text: str)
| 309 | |
| 310 | |
| 311 | def clean_gemini_text(text: str) -> str: |
| 312 | """Remove internal code execution artifacts.""" |
| 313 | text = re.sub( |
| 314 | r'```(?:python|javascript|text)\?code_(?:reference|stdout)&code_event_index=\d+\n.*?```\n?', |
| 315 | '', text, flags=re.DOTALL |
| 316 | ) |
| 317 | return text.strip() |
| 318 | |
| 319 | |
| 320 | def extract_response_text(raw: str) -> str: |
no outgoing calls
no test coverage detected