How to stream response to streamlit?

I have a streamlit app with agent team. I can get the response using agent_team.run with stream=False. Is it possible with stream=True to stream the response to a streamlit app? How would I do that?

Hi @kk_1
Thank you for reaching out and using Phidata! I’ve tagged the relevant engineers to assist you with your query. We aim to respond within 24 hours.
If this is urgent, please feel free to let us know, and we’ll do our best to prioritize it.
Thanks for your patience!

Hello @kk_1 !

You can make use of st.chat_message function to stream response from the Agent. Sharing an example here

1 Like