How do I output cleaner completions on my website?

Now unfortunately, this is one question OpenAI wasn’t able to answer for me tonight. Although it did give me clues.

I am building my website using javascript and react, everything is going well - building out some awesome personal tools and prompts so far.

However one thing I would like is for the completions that I receive back to be styled in a more readable format similar to the OpenAI playground. Is this possible or will I have to live with a block of text being outputted until I do some custom JS work to add line breaks. Although this may get tricky with AI generated data…

Hello I just wanted to bump this because it was already pushed way down and I believe this a fundamental part of developing with OpenAI. I do not believe there is anything in the docs on this as i’ve read through it all twice now.