Skip to content

Email subject analysis system built with Pydantic-AI and OpenAI, leveraging structured data validation and GPT-4 for context-aware email categorization.

Notifications You must be signed in to change notification settings

Croups/email-subject-line-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 

Repository files navigation

Email Subject Line Analyzer

A simple AI-powered email subject line analyzer using Pydantic-AI with agent structure. This tool analyzes email subject lines considering sender context and provides structured insights about priority, sentiment, and required actions.

Features

  • Context-aware email subject analysis
  • Structured response with priority levels
  • Sentiment analysis
  • Action requirement detection
  • Keyword extraction

Installation

pip install -r requirements.txt

Example Usage

email = EmailContext(
    sender_email="sample@gmail.com",
    sender_name="John Doe",
    department="software"
)
        
result = agent3.run_sync(
    user_prompt="Code Review Needed for project #1234 ASAP",
    deps=email
)

print(result.data.model_dump_json(indent=2))

Credits

This project is inspired by Pydantic-AI-Tutorial example by Dave Ebbelaar. Special thanks for the concepts and implementation ideas.

About

Email subject analysis system built with Pydantic-AI and OpenAI, leveraging structured data validation and GPT-4 for context-aware email categorization.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages