Code Monkey home page Code Monkey logo

notiongpt's Introduction

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

notiongpt's People

Contributors

suiwan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

youzizzz1028

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.