AI Personal Learning
and practical guidance

LAMBDA: Localized AI Email Automation System for Rapidly Generating Draft Email (Gmail) Responses

General Introduction

LAMBDA (Local Auto MailBox Draft Assistant) is a localized AI email automation system designed to learn from a user's email style and generate a draft reply for every unread email in the Gmail inbox. The system creates AI-generated draft responses by extracting a user's email communication patterns and fine-tuning the LLaMA model using LoRA.LAMBDA supports Apple Silicon (MLX) and CUDA GPUs, ensuring that the user's data and model are kept entirely local, with no cloud storage or tracking required.


 

blank

 

Function List

  • Automatic extraction of Gmail email communication patterns
  • Fine-tuning LLaMA models using LoRA
  • Generate AI draft replies for unread emails
  • Support for Apple Silicon (MLX) and CUDA GPUs
  • Local data and model storage without the cloud
  • Simple setup, done in 10 minutes

 

Using Help

Installation process

  1. Cloning Warehouse:
    git clone https://github.com/zycyc/LAMBDA.git
    cd LAMBDA
    
  2. Install the dependencies:
    • For Mac (Apple Silicon) and Linux:
      python -m venv .venv
      source .venv/bin/activate
      pip install -r requirements.txt
      
    • For Windows:
      python -m venv .venv
      Set-ExecutionPolicy Unrestricted -Scope Process
      .venv\Scripts\activate
      pip install -r requirements.txt
      
  3. Install PyTorch manually (if necessary):
    • Windows:
      pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124
      
    • Linux:
      pip3 install torch torchvision torchaudio
      

Setting up the Gmail API and credentials

  1. Visit Google Cloud Console and create a new project.
  2. Enable the Gmail API and configure the OAuth consent screen.
  3. Create OAuth 2.0 credentials and download the credentials.json file.
  4. Move the credentials.json file to the LAMBDA project root directory.

Use of LAMBDA

  1. Run the LAMBDA interface:
    python lambda.py
    
  2. Or run a bot in the background:
    nohup python lambda_bot.py &> lambda_bot.log &
    
  3. The interactive menu will guide you through the following options:
    • Create/update training dataset
    • training model
    • Running mail bots
    • Run a complete workflow
    • abort

configure

Edit config.py to customize:

  • Model Selection
  • Training hyperparameters
  • Email Settings
  • Responsive Templates
  • Email Filtering

LAMBDA provides multiple ways to filter processed emails:

  1. Gmail labels (automatic)
  2. Sender blacklisting (manual)
AI Easy Learning

The layman's guide to getting started with AI

Help you learn how to utilize AI tools at a low cost and from a zero base.AI, like office software, is an essential skill for everyone. Mastering AI will give you an edge in your job search and half the effort in your future work and studies.

View Details>
May not be reproduced without permission:Chief AI Sharing Circle " LAMBDA: Localized AI Email Automation System for Rapidly Generating Draft Email (Gmail) Responses

Chief AI Sharing Circle

Chief AI Sharing Circle specializes in AI learning, providing comprehensive AI learning content, AI tools and hands-on guidance. Our goal is to help users master AI technology and explore the unlimited potential of AI together through high-quality content and practical experience sharing. Whether you are an AI beginner or a senior expert, this is the ideal place for you to gain knowledge, improve your skills and realize innovation.

Contact Us
en_USEnglish