跳到正文
DEV Community· Maltheshhh·· 3 小時前AI 評分51

Slow Digest 將羣組聊天整理成兩行摘要,支援本機開放權重模型

Slow Digest: a local open-weight model reads your group chat overnight and leaves you two lines

AI 導讀

Slow Digest 可將用戶貼上或匯入的羣組聊天整理成兩行,分別呈現最重要的變化及需要完成的事項。本機執行時,開放權重模型透過 Ollama 處理聊天;沒有 Ollama 或未安裝模型時,則改用規則式摘要。Render 免費方案上的示範網站沒有 Ollama,因此使用規則式摘要,網址為 https://slow-digest.onrender.com。

正文

Maltheshhh

Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady Submission 🦥

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

What I Built

Slow Digest turns a long group chat into two lines. Paste or export the chat, and it returns the most important change (what, when) and the most important thing you must do (who, by when). The sticker packs, match talk and goodnights are skipped.

It is for anyone who wakes up to 200 unread messages in a class, club or project group and only needs to know what is due. You can run it from the web page, or schedule a script that writes the digest to a file while you sleep.

Demo

Live site: https://slow-digest.onrender.com

The hosted site runs on Render's free plan, which has no Ollama. It uses the rule-based digest there. The open-weight model runs when you start the app on your own machine.

Code

GitHub logo maltheshhh / slow-digest

a “Sloth Summarizer” that squeezes long chats into two lines using an open-weight model that runs in your browser.

Slow Digest

A two-line morning summary of your group chat, written by an open-weight model running on your own machine.

Built for the DEV Hacktoberfest Open-Source AI Challenge, Week 3: Slow and Steady.

Paste an exported chat, get two lines: what changed, and what you must do. Jokes, stickers and goodnights are skipped.

Why open

  • Chats stay on your machine. The server only talks to Ollama on localhost.
  • Works offline. If no model is installed, a rule-based digest takes over.
  • Swap the model. Set OLLAMA_MODEL or choose one per request.
  • No cost per run. No API key.

Stack

  • Node 22 + Express (API and static hosting)
  • Ollama (any open-weight model it can serve)
  • SQLite via the built-in node:sqlite for digest history
  • Plain HTML, CSS and JS frontend

Run it

ollama pull llama3.2:3b     # optional, enables the model engine
npm install
npm start                   # http://localhost:3000

Copy .env.example to .env and export…

How I Built It

  • Model: any open-weight model that Ollama can serve. The default is llama3.2:3b, and you can change it with one environment variable or per request.
  • Backend: Node 22 and Express. POST /api/digest sends the chat to Ollama on localhost and asks for exactly two lines. If Ollama is not running, the same endpoint falls back to a rule-based digest that scores messages by deadlines, days, times and numbers.
  • History: stored in SQLite through Node's built-in node:sqlite, so there are no native packages to install.
  • Frontend: plain HTML, CSS and JS. A tiny sloth crawls along a branch while you read, at an assumed 4 metres a minute.
  • Overnight mode: scripts/sloth_digest.py does the same job from the command line with the Python standard library only. Cron runs it at 3 am and the digest is in a text file by morning.
  • Tests: 5 tests cover chat parsing, the digest rules and the API.

Why Does Open Innovation Matter?

A group chat holds other people's messages, so I did not want to send it to a server I do not control. With a local open-weight model, the chat never leaves the laptop.

The same choice gave me three other things a closed API would not:

  • It works offline. The overnight job needs only a laptop, and the app still works with no model installed.
  • I can swap the model. A smaller one is faster, a larger one handles nuance better, and I can retune the prompt to how my friends write.
  • It costs nothing per run. There is no API key and no meter running while I sleep.

來源:DEV Community · dev.to