def _remove_follow_up_json(self, text: str) -> str:
        """Remove follow-up JSON blocks from the response text"""
        # Remove JSON blocks containing follow_up_question
        pattern = r'```json\s*\n\s*\{.*?"follow_up_question".*?\}\s*\n\s*```'
        return re.sub(pattern, "", text, flags=re.DOTALL).strip()
Remove follow-up JSON blocks from the response text
tools/base.py