I would favor a solution like on StackExchange: Chatbot writes LaTeX formulas enclosed in dollar signs ($e^{-x^2}$) and the Markdown renderer translates them to MathML:
Of course, ChatGPT can already write LaTeX formulas. Just the HTML formatting would deserve an upgrade.