Skip to content
프로젝트

소개

Get control of your overflowing inbox using GPT-3 to classify your emails by importance.

AI 및 머신러닝

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
-2
in 15 days
-2
in 1 month
-2

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

Gmail Importance Classifier using GPT-3

Note: this is a proof on concept and may not work as expected. Use at your own risk.

This script uses OpenAI's GPT-3 to classify the importance of unread emails in Gmail and labels them accordingly. The labels used are:

  • gptJunk
  • gptLow
  • gptNormal
  • gptImportant
  • gptUrgent

Prerequisites

To run this script, you need:

  • Python 3
  • A Google Cloud Platform project with the Gmail API enabled
  • Credentials for the Gmail API
  • An OpenAI API key
  • ==Add the labels listed above to your gmail account before running the script==

Installation

  1. Clone this repository
  2. Install the required Python packages by running pip install -r requirements.txt
  3. Set up the Google Cloud Platform project and the Gmail API credentials by following the instructions here and saving the credentials file as credentials.json in the project directory
  4. Obtain an OpenAI API key by following the instructions here
  5. Save the OpenAI API key to a text file named openaikey.txt in the project directory

Usage

  1. (optional) Customize the prompt.txt file as desired.
  2. (optional) Modify the model used in openai_api.py (line 25) - text-davinci-0003 by default.
  3. Run the script by running python gmail_assist.py
  4. The script will connect to the Gmail API and find unread emails not already labeled by the script. They will be labeled based on their importance.

What you do with them from there is up to you. The emails will not be modified in any other way. The tags can be used for bulk processing or creating other rules.

To process another account, delete the token.pickle file that was created when you first authenticated and run the script again.

What's Next

This started as a Thunderbird plugin which had the benefit of running on every new email that comes in. I may try to implement that.

I will accept pull requests from anyone who wants to help build this out more.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Acknowledgments

  • OpenAI for providing the GPT-3 API
  • Google for providing the Gmail API

관련 프로젝트 살펴보기

불러오는 중…