Skip to content

johntday/notion-chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chatbot to answer your questions as a conversational agent from a Notion knowledge base

Python 3.8 Streamlit App License: MIT

Purpose

An experimental RAG chatbot using Notion database as knowledge base. The chatbot is built using

  • Streamlit web app for the chatbot
  • Qdrant for vector search
  • OpenAI for text generation and embeddings
  • Notion for fetching content and metadata from Notion database

Article with step-by-step details.

Features

  • Chatbot using OpenAI models for RAG text generation and embeddings
  • Uses Notion database documents for document embeddings
  • Uses Qdrant for vector search
  • Streamlit web app for the chatbot
  • Settings for search are configurable
  • Search result embeddings from Notion database are shown

Example

Example of the chatbot answering questions from a Notion database. The database is a knowledge base about SAP Commerce (Hybris) - an eCommerce platform by SAP.

AI-RAG-using-notion-db.gif

HOW TO RUN THE APP LOCALLY

Follow these steps to set up and run the python app locally :

Prerequisites

  • Python 3.8 or higher
  • Git
  • Poetry

Installation

Clone the repository :

git clone https://github.com/johntday/notion-chat.git

Navigate to the project directory :

cd notion-chat
# now at project root

Create a virtual environment and install requirements using Poetry :

poetry install

Setup Environment Variables :

# at project root
cp notion_chat/.streamlit/secrets.toml.example notion_chat/.streamlit/secrets.toml

# edit the "secrets.toml" file and add your OpenAI API key

Run the app locally :

cd notion_chat
streamlit run chat.py

Pycharm Run Configuration

If you are using Pycharm, you can create a run configuration to run the app locally :

img.png

References

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages