This project aims to develop an intelligent email management assistant system to improve the efficiency of email handling in both organizational and personal use. As the volume of email communication continues to increase, users are required to spend considerable time filtering, categorizing, and understanding large amounts of email content. In addition, unwanted emails and spam messages may contain deceptive or harmful content that poses security risks to users. Therefore, this project applies Large Language Model (LLM) technology to process language-based content and support systematic email management.
- Python 3.11
- Miniconda or Anaconda (not required but recommended for environment management)
- Git
-
Clone the repository
Open the terminal and navigate to the directory where you want to clone the repository, then run:
git clone https://github.com/ai-email-client/backend.git -
Install the required packages
You can use Miniconda or Anaconda to create a virtual environment:
conda env create -f env.ymlor if you want to install the required packages directly:
pip install -r requirements.txt -
Set up the environment variables
All configuration is stored in the
.envfile following the.env.exampletemplate:cp .env.example .env
Edit
.envwith your credentials Important variables include:GOOGLE_CLIENT_ID: Your Google client IDGOOGLE_CLIENT_SECRET: Your Google client secretGOOGLE_REDIRECT_URI: Your Google redirect URISUPABASE_URL: Your Supabase URLSUPABASE_KEY: Your Supabase keyDIFY_URL: Your Dify URLDIFY_SUMMARY: Your Dify summary app IDDIFY_WRITER: Your Dify writer app IDSECRET_KEY: Your secret key for JWT tokenALGORITHM: Your algorithm for JWT token
-
Run the application
python main.py
or use docker
docker compose up -d
โปรเจกต์นี้มีเป้าหมายเพื่อพัฒนาระบบผู้ช่วยจัดการอีเมลอัจฉริยะ เพื่อเพิ่มประสิทธิภาพในการจัดการอีเมลทั้งในระดับองค์กรและส่วนบุคคล เนื่องจากปริมาณการสื่อสารผ่านอีเมลเพิ่มขึ้นอย่างต่อเนื่อง ผู้ใช้จึงต้องใช้เวลามากในการกรอง จัดหมวดหมู่ และทำความเข้าใจเนื้อหาอีเมลจำนวนมาก นอกจากนี้ อีเมลที่ไม่ต้องการและสแปมอาจมีเนื้อหาที่หลอกลวงหรือเป็นอันตราย ซึ่งก่อให้เกิดความเสี่ยงด้านความปลอดภัยแก่ผู้ใช้ ดังนั้น โปรเจกต์นี้จึงนำ Large Language Model (LLM) มาประยุกต์ใช้ในการประมวลผลเนื้อหาที่เป็นภาษา และรองรับการจัดการอีเมลอย่างเป็นระบบ
- Python 3.11
- Miniconda หรือ Anaconda (ไม่จำเป็น แต่แนะนำสำหรับการจัดการสภาพแวดล้อม)
- Git
-
โคลน Repository
เปิด Terminal แล้วไปยังไดเรกทอรีที่ต้องการโคลน Repository จากนั้นรันคำสั่ง:
git clone https://github.com/yourusername/ai-email-client.git -
ติดตั้งแพ็คเกจที่จำเป็น
สามารถใช้ Miniconda หรือ Anaconda เพื่อสร้าง Virtual Environment:
conda env create -f env.ymlหรือหากต้องการติดตั้งแพ็คเกจโดยตรง:
pip install -r requirements.txt -
ตั้งค่า Environment Variables
การกำหนดค่าทั้งหมดจะถูกเก็บไว้ในไฟล์
.envตามเทมเพลต.env.example:cp .env.example .env
แก้ไขไฟล์
.envโดยใส่ข้อมูลรับรองของคุณ ตัวแปรที่สำคัญ ได้แก่:GOOGLE_CLIENT_ID: Google Client ID ของคุณGOOGLE_CLIENT_SECRET: Google Client Secret ของคุณGOOGLE_REDIRECT_URI: Google Redirect URI ของคุณSUPABASE_URL: Supabase URL ของคุณSUPABASE_KEY: Supabase Key ของคุณDIFY_URL: Dify URL ของคุณDIFY_SUMMARY: ID ของ Dify Summary App ของคุณDIFY_WRITER: ID ของ Dify Writer App ของคุณSECRET_KEY: Secret Key สำหรับ JWT Token ของคุณALGORITHM: อัลกอริทึมสำหรับ JWT Token ของคุณ
-
รันแอปพลิเคชัน
python main.py
หรือใช้ Docker:
docker compose up -d