https://github.com/Suiwan/notionGPT
NotionGPT, a practical tool built on top of ChatGPT large language model, make it your note-taking assistant!
https://github.com/Suiwan/notionGPT
chatgpt fastapi llm pinecone python vectordb
Last synced: 3 months ago
JSON representation
NotionGPT, a practical tool built on top of ChatGPT large language model, make it your note-taking assistant!
- Host: GitHub
- URL: https://github.com/Suiwan/notionGPT
- Owner: Suiwan
- Created: 2023-05-06T11:45:09.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-05-18T01:24:44.000Z (over 2 years ago)
- Last Synced: 2025-01-06T00:36:07.266Z (11 months ago)
- Topics: chatgpt, fastapi, llm, pinecone, python, vectordb
- Language: Python
- Homepage:
- Size: 76.2 KB
- Stars: 16
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome_ai_agents - Notiongpt - NotionGPT, a practical tool built on top of ChatGPT large language model, make it your note-taking assistant! (Building / Tools)
README
# NotionGPT
NotionGPT, a practical tool built on top of ChatGPT large language model, make it your note-taking assistant!
# 简介
NotionGPT,一款ChatGPT大模型下游的实用工具,能够根据你的Notion笔记内容进行问题回答。
# 实现步骤
1. 通过官方API获取Notion笔记数据 (https://developers.notion.com/reference/intro)
2. 使用SnowNLP进行中文分句(https://github.com/isnowfy/snownlp)
3. 调用OPENAI的Emeddling API 进行句子Embedding (https://platform.openai.com/docs/api-reference/embeddings)
4. 使用Pinecone进行向量存储与查询
5. 构造prompt
6. 调用OPENAI的QA API 进行问题回答
# Tech Stack
1. Notion API: get_database_content & page_content
2. SnowNLP: chinese sentence segmentation
3. Pinecone: vectorDB- personal knowledge DB- upsert & query
4. OpenAI: sentence embedding & prompt QA
5. FastAPI: Frontend web UI
6. Prompt Engineering: CoT(Chain of Thought), Search in chain, chain of keyword()
# Usage
1. Notion: data_base_id & auth_token
2. Pinecone: pinecone api key & pinecone env_name (proxy needed)
3. OpenAI: openai api key
4. `git clone https://github.com/Suiwan/notionGPT.git`
5. `pip install -r requirements.txt`
6. Fill in code
7. `python webUI.py`
# Todo
- [ ] Add function of updating notes to dababase
- [ ] Better prompt engineering
- [ ] Other QA LLM support
- [ ] Local vector database
# Reference
- Chain of Thought: https://arxiv.org/abs/2201.11903
- Search in Chain: https://arxiv.org/abs/2304.14732