A Streamlit chatbot application that integrates Notion, ChromaDB, and LangChain. The chatbot leverages pre-trained embedding models to enable users to query information efficiently from Notion databases.
- Document Parsing: Load and process documents directly from Notion using
NotionDBLoader
. - Chunking: Split large documents into manageable chunks for efficient retrieval.
- Chroma Vector Store: Store embeddings and metadata in ChromaDB for similarity search.
- Streamlit Frontend: An interactive web-based interface for chatting with the chatbot.
- Open Source Models: Uses the lightweight
all-MiniLM-L6-v2
embedding model for fast and accurate results.
git clone https://github.com/jabahm/notion-chroma-chatbot.git
cd notion-chroma-chatbot
python3 -m venv venv
source venv/bin/activate # For Windows: venv\Scripts\activate
pip install -r requirements.txt
Create a .env file in the project root with the following variables:
NOTION_INTEGRATION_TOKEN=<Your Notion Integration Token>
NOTION_DATABASE_ID=<Your Notion Database ID>
Run the notion_to_chroma.ipynb notebook or convert it to a Python script. This will:
- Load documents from your Notion database.
- Chunk the documents into smaller pieces. -Generate embeddings and save them to ChromaDB.
streamlit run app.py
You can containerize the application using the provided Dockerfile.
docker build -t notion-chroma-chatbot
docker run -p 8501:8501 --env-file .env notion-chroma-chatbot
The chatbot will be accessible at http://localhost:8501.