-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Chatbot: limit width of chat bubbles to be the size of the messages #4420
Comments
Hi @lucasjinreal what do you mean by bubbles? Can you please provide example code to repro and explain what you are getting vs. what you are expecting? |
@abidlabs Hello, its about ChatBot UI component.
Would it better to make it fit automatically to content just like iMessages?
|
Thanks for the clarification, @lucasjinreal I've renamed the issue to reflect #1, it's something we'll think about! |
@abidlabs thank u. I just find a repo using gradio made it, do u know what code they possible use? (nevertheless you are the creator of gradio!) ![]() as you can see, their incoming bubble of mine, is limited width |
You can see their code here: https://huggingface.co/spaces/project-baize/chat-with-baize/blob/main/app.py |
Hi @lucasjinreal, in case you are still trying to figure out the solution, you can use custom CSS to limit the width of chatbot bubbles to the text size. We have addressed this query on our Discord server here if this is helpful - https://discord.com/channels/879548962464493619/1115927377277628517/1115927377277628517 |
|
Thanks @1ittlesnow for the custom css. We may add it at some point as an option within the chatbot but not a priority right now since there's a workaround. (cc @dawoodkhan82) |
@abidlabs @1ittlesnow We might not add an option to adjust the chat bubble width. But one this we are considering is allowing devs to choose from a few select chatbot styles. One of these styles would include a chatbot where the bubbles are only as wide as the message (along with other style changes). |
Just brainstorming here, but wouldn't it be better to have separate parameters for these options in case someone wants to stick to the default style but have limited-width bubbles? |
Since removing the |
Would look nicer IMO if the chat bubbles only extended to the width of the message (from the left or right, depending on user/bot) |
Apologize for following up on comments under an issue that hasn't seen new progress for quite some time. However, in fact, as shown in this image, Baize used the code from our ChuanhuChat project to build this demo: ![]() @lucasjinreal You can review our project code here: https://github.com/GaiZhenbiao/ChuanhuChatGPT |
Is there a way to add max width constraints to bubbles containing the messages?
The text was updated successfully, but these errors were encountered: