I am able to do so using below code snippet. However, when next user input is received, the formatting in the previous message fades away. Check the second screenshot below.
with st.chat_message("user"):
st.write(user_input)
st.text(usage_message)
Can you clarify what the value of user_message is? Is it <br><span style='font-size: 12px; color:#999'>No. tokens used: 663; Cost of the query: $0.01989</span>'? Or is it just No. tokens used: 663; Cost of the query: $0.01989?