NotionGPT, a practical tool built on top of ChatGPT large language model, make it your note-taking assistant!
NotionGPT,一款ChatGPT大模型下游的实用工具,能够根据你的Notion笔记内容进行问题回答。
- 通过官方API获取Notion笔记数据 (https://developers.notion.com/reference/intro)
- 使用SnowNLP进行中文分句(https://github.com/isnowfy/snownlp)
- 调用OPENAI的Emeddling API 进行句子Embedding (https://platform.openai.com/docs/api-reference/embeddings)
- 使用Pinecone进行向量存储与查询
- 构造prompt
- 调用OPENAI的QA API 进行问题回答
-
Notion API: get_database_content & page_content
-
SnowNLP: chinese sentence segmentation
-
Pinecone: vectorDB- personal knowledge DB- upsert & query
-
OpenAI: sentence embedding & prompt QA
-
FastAPI: Frontend web UI
-
Prompt Engineering: CoT(Chain of Thought), Search in chain, chain of keyword()
-
Notion: data_base_id & auth_token
-
Pinecone: pinecone api key & pinecone env_name (proxy needed)
-
OpenAI: openai api key
-
git clone https://github.com/Suiwan/notionGPT.git
-
pip install -r requirements.txt
-
Fill in code
-
python webUI.py
- Add function of updating notes to dababase
- Better prompt engineering
- Other QA LLM support
- Local vector database
- Chain of Thought: https://arxiv.org/abs/2201.11903
- Search in Chain: https://arxiv.org/abs/2304.14732