LaTex on streaming replies

LaTex formatting for Streamlit apps

I have a bot which can switch between giving (for example) legal, medical, or scientific advice. I have yet to see a definitive answer as to how to parse a gpt-4 response with an equation such as “Newton’s law of F=ma…” doesn’t result in F=m\d^2\x * m (or something similar, like “partial/d^2/dt^2/…” etc you get the point, it’s not LaTex formatted. But I don’t know what will come back from my query: explain quantum mechanics" will have plenty of text, but certainly some equations also. Isn’t there any way to format an unknown output with Latex while preserving the text explanation? I don’t even care if the explanation is in mathematica markdown, but this /partial/d/dx(rho)… format must be fixed so the equations are readable. Is there a solution to this problem?

Of course that depends of what is in the response.

That sounds like you can’t know for sure how to properly parse it.

No. Have you tried asking the AI to format the response as Latex or markdown? That would be not perfect but may be good enough.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.