Relative Content

Tag Archive for reactjsmarkdownopenai-apiremarkjs

How to format gpt-x output in react.js

Using OpenAI api i receive raw formatting from GPT-x which i’d like to display in HTML using React.js. I’ve explored using react-markdown with the remark-math plugin, but GPT seems to respond with parenthesized math – “( frac{3}{4} )” – instead of dollar-delimited math – “$frac{3}{4}$”. Can someone point me to how I can reconfigure my components correctly? Here’s an (incomplete) example of what’s done: