IDK if there's native support for what you're looking for, but you could extract the mermaid code from the response and then using mermaid-py extract it to a png to then serve it as an chainlit.Image element.