Skip to content

Symplythatguy/Assignment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AutoReply Assistant

Solve a real-world problem: small businesses and solo founders lose time drafting replies to customer emails and inquiries.
This prototype helps you paste an incoming message and get a high‑quality suggested reply, which you can edit and send.

✨ What this project demonstrates

  • AI in the development process: uses an LLM to generate the reply drafts (core feature).
  • Working prototype: Flask app with HTML UI (no build step).
  • Tests & CI: pytest unit tests and a GitHub Actions workflow.
  • Containerized: Dockerfile + docker-compose.

🧱 Tech

  • Python 3.10+
  • Flask
  • OpenAI SDK (openai)
  • pytest
  • dotenv

🏁 Quickstart

git clone <YOUR_FORK_URL> autoreply-assistant
cd autoreply-assistant
python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
pip install -r requirements.txt

# Set your OpenAI API key
cp .env.example .env
# then edit .env and set OPENAI_API_KEY

# Run the app
flask --app app/app.py --debug run
# open http://127.0.0.1:5000

🐳 Docker

docker build -t autoreply .
docker run -p 5000:5000 --env-file .env autoreply
# open http://127.0.0.1:5000

🧪 Tests

pytest -q

📁 Project structure

app/
  app.py              # Flask application
  ai.py               # LLM interaction wrapper
  templates/
    base.html
    index.html
  static/
    style.css
tests/
  test_app.py
.github/
  workflows/
    ci.yml
scripts/
  sample_inbox.csv    # Example "inbox" file
  batch_reply.py      # CLI: generate replies for CSV rows
requirements.txt
.env.example
Dockerfile
docker-compose.yml
LICENSE
README.md

🔐 Environment

  • OPENAI_API_KEY – your API key
  • OPENAI_MODEL (optional, default: gpt-4o-mini)

Note: You can swap the model/provider in app/ai.py.

📝 How to use

  1. Paste an incoming message.
  2. Optionally choose a tone (friendly, concise, apologetic, etc.) and include key facts (pricing, timing, policy).
  3. Click Generate Reply.
  4. Edit and copy the draft.

🚀 Extending ideas

  • Gmail/Outlook integration (IMAP/Graph APIs).
  • Multi‑language replies.
  • Team templates and style guides.
  • Fine-tune with your historical replies.
  • Add guardrails (PII scrubbing, toxicity filters).

MIT License © 2025

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors