跳到正文
DEV Community· chiragmangaldev3112·· 2 小時前AI 評分43

Torpor:在本機為收件箱生成隔夜摘要

Torpor — Your Inbox, Summarized While You Sleep (Fully Local)

AI 導讀

Torpor 是一款完全在本機運行的 AI 收件箱摘要工具,會分析隔夜訊息,分出「需要你處理」和「可以稍後處理」,並生成摘要。它透過 Ollama 使用 nomic-embed-text 產生嵌入向量,並以 qwen3:8b 撰寫摘要;全程離線、不需 API key,訊息不會離開用戶的裝置。作者提醒,分類採用簡單的統計啟發式方法,測試時曾漏掉一則安全警示。

正文

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

What I Built
torpor — a lazvideo linky, fully-local overnight inbox digest. Instead of reading every message that came in overnight, you run one command and torpor reads them for you, using only open-weight models running on your own machine. Named after the energy-saving dormant state animals (sloths included) drop into when there's no reason to spend effort.

Point it at a JSON file of messages and it: embeds each one locally, scores it against a handful of "this needs a human" reference phrases by meaning (not keyword matching), splits messages into "needs you" vs. "can wait" using the inbox's own score distribution, and asks a local model to write a genuine 2–3 sentence summary of what actually matters.

Demo

$ ollama pull qwen3:8b
$ ollama pull nomic-embed-text
$ npm start

torpor: barely awake. 10 messages to get through, so I'll do it.

While you were asleep: 3 of 10 actually need you. The other 7 can wait.

In short (qwen3:8b, running right here):
Partner NDA requires your signature by Friday's kickoff call to avoid delaying
the start date. Overdue invoice #4471 ($3,200) risks service interruption if
not paid by end of day. Production deploy failed at 2am due to a database
migration error; no one has addressed it yet.

Worth getting up for:
[0.64] legal@example.com — NDA needs your signature
[0.59] billing@vendor-example.com — Invoice #4471 overdue
[0.58] ops@example.com — Production deploy failing

Can stay asleep for these:
[0.57] friend@example.com — lunch next week?
[0.56] priya@example.com — Quarterly numbers due
[0.55] security-alert@example.com — New sign-in detected
...
That whole run takes a few seconds, on a laptop, offline.

Code
https://github.com/chiragmangaldev3112/torpor

How I Built It
Two separate local-AI calls, both through Ollama: nomic-embed-text for embeddings, qwen3:8b for the summary. A naive fixed similarity threshold only caught 1 of 3 real urgent messages in testing — cosine similarity on short text clusters tightly — so the "needs you" split uses an adaptive threshold (the inbox's own mean + half a standard deviation) instead of a magic number.

Why Does Open Innovation Matter?
It runs with no internet and no API key. The whole pipeline — embeddings and the summary — happens on localhost:11434.
Your messages never leave your machine. An overnight digest is, by definition, a summary of everything you haven't read yet — sending that to someone else's model every night is a real privacy cost a local model avoids entirely.
It's free to run forever. No per-token billing on something meant to run every day, unattended.
You can swap the model. Nothing here is tied to one vendor — change an env var, use a different model you've pulled.
This idea grew out of a larger assistant platform I'm building separately, where open-weight models aren't a one-off choice: a code-search feature embeds an entire repository locally with no cloud alternative implemented at all, a small model can be fine-tuned on a person's own writing through a local LoRA pipeline, and step-by-step task decisions are made by a local model through the same provider-agnostic interface. Torpor is a from-scratch, stripped-down demonstration of that same philosophy, built fresh for this challenge.

The Lazy Payoff
Before: open the inbox, scan every message, figure out what's actually urgent. After: run one command, read three sentences, know exactly what needs you — the overdue invoice, the failed deploy, the NDA deadline, not the lunch invite.

Honest caveat: the attention/FYI split is a simple statistical heuristic, not a trained classifier — it missed a security alert in testing (landed just under the threshold). Good enough for a weekend build, not a production safety net.

Prize Categories
None — local-only, no partner tech used.

來源:DEV Community · dev.to