A Retrieval-Augmented Generation (RAG) chatbot designed for NYRU COFFEE & JUICE, built using Streamlit, the Gemini API, and a TiDB Vector Database.
- Interactive Chat Interface
- RAG Architecture
- Powered by Gemini
- TiDB Vector Search
- Frontend / UI: Streamlit
- LLM: Google Gemini (
google-generativeai) - Embeddings: Sentence Transformers (
BAAI/bge-m3) - Database: TiDB (MySQL compatible with Vector search capabilities)
- Data Ingestion: Pandas
- Python 3.12
- A Gemini API Key from Google AI Studio.
- A TiDB Cloud Serverless Cluster configured with a
documentstable for storing vector embeddings.
-
Clone the repository (if applicable) and navigate to the project directory.
-
Create a virtual environment:
python -m venv .venv
-
Activate the virtual environment:
- Windows:
.\.venv\Scripts\activate - Mac/Linux:
source .venv/bin/activate
- Windows:
-
Install dependencies:
pip install -r requirements.txt
-
Configure Environment Variables: Create a
.envfile in the root directory based on your credentials:TIDB_HOST=your_tidb_host TIDB_PORT=4000 TIDB_USER=your_tidb_user TIDB_PASSWORD=your_tidb_password TIDB_DATABASE=RAG TIDB_SSL_CA=isrgrootx1.pem GEMINI_API_KEY=your_gemini_api_key
Start the Streamlit application by running:
streamlit run app.pyThis application is designed to be easily deployed to Streamlit Community Cloud.
Simply connect your GitHub repository and configure your .env keys in the Streamlit Cloud Secrets Management dashboard.
