How to parse and beautify the llm output?

I am using .invoke() command for showing output in Streamlit. And was not able to find any documentation on it. Can someone please let me know how can I format this output.

Could you please further clarify your question by providing any relevant code snippets?


THIS IS THE CODE I’VE BEEN USING AND BELOW IS THE OUTPUT THAT I WANT TO MAKE MORE USER READABLE.

Try response.content to show only LLM generated string.

Thanks a lot for your help.