Real time markdown rendering while streaming OpenAI API response

I have shared some information on this topic in another post, maybe somebody finds it useful Another attempt to parse Markdown stream in real time