Creating a copy button for response from the Chatbot without using st.code

I am creating a chatbot and would like to know if there is a way to create a copy button in Streamlit which would allow to copy the response (like in ChatGPT).

I tried using st.code but it highlights reserved words and also the text is not wrapped properly.

Is there a way it can be implemented without using st.code?

Hi @pradeepgadkari

There’s actually an implementation made by a community member that does this:

Hope this helps!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.