AttributeError: module 'streamlit' has no attribute 'write_stream'

how do i fix the following error?
for a chat gpt clone

AttributeError: module ‘streamlit’ has no attribute ‘write_stream’

Hi @0xdavidordonez,

Thanks for sharing your question with the community! :balloon: Please update your debugging post to include a code snippet and a link to your app’s public GitHub repo – this will allow the community to help you find an answer as quickly as possible. In the meantime, this post will be tagged as needs-more-info.

Also, please ensure that you’re using the latest Streamlit version as st.write_stream was introduced in version 1.31.