跳到正文
DEV Community· Himanshu Nikam·· 3 小時前AI 評分50

SleepIn:離線整理 WhatsApp 和 Telegram 羣組訊息,找出重要事項

SleepIn: Because I Refuse to Scroll 500 Unread Group Chat Messages Every Morning

AI 導讀

SleepIn 讓用戶匯入 WhatsApp 或 Telegram 聊天記錄,由本機 AI 摘要羣組中的重要訊息和可稍後處理的內容。聊天記錄在瀏覽器本機解析,推理由 Ollama 在 localhost 執行,無須雲端 API、登入帳戶或訂閲;預設使用 llama3.2,亦支援其他本機模型。

正文

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady.

What I Built

I often wake up to hundreds of unread messages across family, friends, and apartment group chats.

Most are greetings, stickers, forwards, cricket debates, and parking arguments. Somewhere in that noise, however, Mom may have asked me to call or tonight’s plan may have moved to Saturday.

I built SleepIn so I can find those two important messages without reading the other 500.

Drop in WhatsApp or Telegram chat exports, enter your name, and SleepIn produces a private morning digest such as:

Rahul’s birthday moved to Saturday, Mom wants you to call, nothing else matters.

The result is divided into:

  • What matters: Direct requests, changed plans, deadlines, money, health, and family updates.
  • What can wait: Everything that does not require my attention.

Every result includes the relevant group name. Senders retain the name—or unsaved phone number—found in the original export.

It is essentially a permission slip to mute every group chat and sleep peacefully.

Demo

SleepIn morning digest

Code

GitHub logo neoquantx / SleepIn

Sleep in. A local AI reads last night's WhatsApp and Telegram group chats and gives you the two lines that matter. Runs fully offline with Ollama.

SleepIn

I'm in a family group, a friends group and a society group, and every morning there are a few hundred unread messages waiting. Usually only two of them matter. So I made SleepIn: you give it last night's WhatsApp or Telegram export, a small open-weight model running on your own laptop reads everything, and you get something like:

Rahul's birthday moved to Saturday, mom wants you to call, nothing else matters.

SleepIn digest for the sample chats

Everything runs on your machine. The chat file is parsed in the browser and the summary comes from Ollama on localhost. No cloud API, no login, no analytics (Next.js telemetry is switched off in the npm scripts too). That was the whole point. I'm not uploading my mom's messages anywhere.

Made for Week 3 of the Hacktoberfest Open-Source AI Challenge, "Slow and Steady" (International Sloth Day). The model does the catching up overnight, you stay in bed.

Running

…

How I Built It

SleepIn uses Next.js 16, TypeScript, Tailwind CSS, shadcn/ui, and Ollama.

The processing flow is intentionally simple:

  1. The user exports a WhatsApp .txt file or Telegram result.json.
  2. SleepIn parses the export and filters the selected time window.
  3. A local open-weight model reads each group separately.
  4. The app combines only the important results into one short digest.

WhatsApp exports differ between Android and iPhone, so I created a parser that handles both formats, multiline messages, 12/24-hour timestamps, media placeholders, deleted messages, and system notices. The Telegram parser supports individual chats and full-account JSON exports.

Why one chat at a time?

My first version sent every group to the model at once. A small 3B model sometimes mixed up conversations, treated jokes as important, or attached a message to the wrong group.

The improved version processes one group at a time and requests structured JSON containing:

  • A short headline
  • An importance score
  • Items that matter
  • Items that can wait

This is slower, but significantly more reliable—which fits the Slow and Steady theme perfectly.

I also added guardrails around the model:

  • Names and places absent from the source chat are rejected.
  • A group needs evidence such as a direct mention, request, or changed plan before reaching the main digest.
  • Later messages override earlier plans.
  • If Ollama is unavailable, demo mode still lets people try the complete experience.

SleepIn defaults to llama3.2, while also supporting locally installed models such as Qwen, Gemma, Mistral, and Phi.

Why Does Open Innovation Matter?

Private group conversations can contain phone numbers, home addresses, health updates, financial details, and family information. Uploading all of that to a closed cloud API did not feel responsible.

With Ollama and open-weight models, SleepIn can run on the user’s own computer:

  • Chat files are parsed locally.
  • Inference runs through Ollama on localhost.
  • No messages are sent to a cloud AI provider.
  • There are no API keys, subscriptions, accounts, or per-token charges.
  • Users can change the model instead of being locked to one provider.

A cloud model might respond faster, but this project does not need instant output. Taking around a minute to privately process hundreds of overnight messages is a trade-off I am happy to make.

In SleepIn, being slow is not a limitation. It is part of the privacy model.

The Lazy Payoff

I created three reproducible sample conversations representing a realistic morning inbox:

  • A friends group where Rahul’s birthday moves to Saturday
  • A family group where Mom asks for a call
  • A residents group full of parking arguments and a temporarily lost cat

Together, they contain roughly 520 messages.

Reading them manually could take 10–15 minutes—and I might still miss the final venue change. SleepIn processes them while I make coffee and returns the two lines that deserve my attention.

That is the payoff: less scrolling, fewer missed plans, and a few extra minutes in bed.

Prize Categories

  • Overall Challenge: SleepIn is entered for the overall prize of $250 USD, DEV++ membership, and the exclusive winner badge.
  • Partner Categories: Github Colipot .

來源:DEV Community · dev.to