Build a chatbot hosted on Streamlit Community Cloud and powered by LlamaIndex that augments Google Gemini with local documents. This repository is used in the Build Your Own AI Chatbot offered by King Library's Digital Humanities Center. The original code for this chatbot is based on the chabtot described in this blog post.
The demo chatbot is an expert on the works of author Rabindranath Tagore. Fork the repository and add your own documents to create a chatbot that focuses on a different topic.
- Takes user queries via Streamlit's
st.chat_input
and displays both user queries and model responses withst.chat_message
- Uses LlamaIndex to load and index data and create a chat engine that will retrieve context from that data to respond to each user query
https://sjsu-chatbot-workshop.streamlit.app/
Follow the steps in the workshop slides at https://tiny.sjsu.edu/chatbot-workshop-2025
Caution
Don't commit your secrets file to your GitHub repository. The .gitignore
file in this repo includes .streamlit/secrets.toml
and secrets.toml
.
Once the app is loaded, enter your question about Rabindranath Tagore and wait for a response.
The demo version of the chatbot uses texts from the writer Rabindranath Tagore. These texts are available from Project Gutenberg.