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

Future Want: Add scroll bar #20

Open
yippp opened this issue May 16, 2023 · 4 comments
Open

Future Want: Add scroll bar #20

yippp opened this issue May 16, 2023 · 4 comments

Comments

@yippp
Copy link

yippp commented May 16, 2023

interesting work. The front end performance is better than st_chat. Is there any way to add scrolling bar to chat log, and keep input area always the top of the page, then it will looks like a real chat app.

@tipani86
Copy link
Owner

tipani86 commented May 16, 2023

Hi there @yippp thanks for the comments! I thought the scrolling bar was already there if the chat history becomes longer than the single browser view height?

image

Maybe if you can draw a simple image to explain what you mean?

Also, I thought when input is below the page, it looks like a real chat app. Think about WeChat, Whatsapp... pretty much any chat app the input is under the chat history, no?

@yippp
Copy link
Author

yippp commented May 16, 2023

I'm sorry it seems like I didn't describe my idea clearly before. I appreciate you implementing an excellent dialogue interface on Streamlit, which has been helpful for my own projects. However, I believe the current page showing CatGDP still doesn't feel like a perfect dialogue function. I'm not sure if you have any ideas on how to achieve the following features:

Always keep the text input field at the bottom of the current page. When there is a long history of dialogue, you don't have to drag the scroll bar to type input directly.
Show the scroll bar only in the container of the dialogue history, rather than scrolling the entire interface.
These two points should be considered as a requirement, which is to limit the total height of the dialogue history record. Without scrolling the entire page, you can input new dialogues without having to scroll the entire interface. If the dialogue history is too long, only the dialogue history part will be scrolled.

I'm also trying to build a dialogue system based on LLM using Streamlit, and I highly appreciate the author's source code, which gave me many insights. If you have any ideas on how to achieve the above features, not only can it help me, but it can also make your CatGDP more excellent. Once again, thanks for your excellent project.

@tipani86
Copy link
Owner

Okay @yippp I understood what you mean. You want the text input to be fixed on the bottom and doesn't scroll with the rest of the view. I will have to think about how to do it in Streamlit... not sure if it's easy to do.

@tipani86
Copy link
Owner

tipani86 commented Jul 7, 2023

Hi @yippp did you notice there was a new version from Streamlit that added a Chat Input element which always stays at the bottom of the screen? Check it out here: https://docs.streamlit.io/library/api-reference/chat/st.chat_input. Maybe you want to fix the CatGDP to use it instead of the current version? Feel free to contribute to the project and create a PR! :)

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

No branches or pull requests

2 participants