Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

streaming response in Streamlit using streamlit_chat -message #43

Open
itsalwaysamir opened this issue Jun 4, 2023 · 4 comments
Open
Labels
enhancement New feature or request

Comments

@itsalwaysamir
Copy link

itsalwaysamir commented Jun 4, 2023

Hi,
Does anyone know if I can display chatgpt-like streaming response in Streamlit using streamlit_chat -message?

I need something like message(streaming=True) or any other alternative for this. my code segment is as below:

from streamlit_chat import message
import streamlit as st

for i in range(len(st.session_state['generated']) - 1, -1, -1):
message(st.session_state['past'][i], is_user=True, key=str(i) + '_user')
message(st.session_state["generated"][i], key=str(i))

@eshaanagarwal
Copy link

HI ! I also need similiar kind of component. Can somebody help on this ? I would really appreciate it. Its kinda urgent

@eshaanagarwal
Copy link

Any update on this ? It would be great if anybody could let me know

@itsalwaysamir
Copy link
Author

itsalwaysamir commented Jun 23, 2023

@eshaanagarwal eshaanagarwal

someone answered this here. see if it works for you or not! i goona see.
https://stackoverflow.com/questions/76408677/streaming-response-line-chatgpt/76427395#76427395

@yashppawar yashppawar added the enhancement New feature or request label Jun 23, 2023
@nubgamerz
Copy link

I would also like to see this.

The issue with this synchronous approach is that it takes a really long time to get a response.

If this supported streaming (for example, langchain supports streaming with on_llm_new_token callback) it would significantly increase the usability of this chat application.

For now, it's a cool idea, but without text streaming, it's just not usable in real world scenarios.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants