This side project aims to add new functionalities to the standard Streamlit chat interface:
- π₯ Chat history export (in JSON format)
- π§Ή Clear chat
- π¨ Image upload (or any another file) thanks to
st.experimental_dialog
(Streamlit β₯ 1.35.0) - π Rerun last question
- π and π feedback buttons (registered in the logs)
- π¬ tokens count
- π©βπ» chat avatars personalization
[01/06 update]: Thanks to the awesome work of bouzidanas and its streamlit-float
library, the chat options stay close to the chat input π€©.
The video below shows how they integrate into the UI:
The logs corresponding to the feedback buttons are:
INFO:root:2024-05-22 14:35:23: positive: [{"role": "user", "content": "1+1"}, {"role": "assistant", "content": "1+1 equals 2."}]
INFO:root:2024-05-22 14:35:30: negative: [{"role": "user", "content": "2+2"}, {"role": "assistant", "content": "2 + 2 equals 4."}]
The demo hosted here is limited to 3 questions and/or 300 tokens.
The code does not leverage all possible improvements offered by Streamlit (like caching) so I look forward to getting pull requests to make this small project better π