SlothDigest:用 Gemma 將羣組聊天濃縮成兩行摘要
Sloth Digest
SlothDigest 使用在本機透過 Ollama 執行的 Gemma 3(gemma3:4b),把羣組聊天整理成兩行:一行概述發生的事,另一行列出當日要做的事。內容不會上傳,工具可離線使用,並提供網頁版及定時執行的 Python 版本。忙碌的一天若有約 200 則訊息,閲讀原文約需 10 分鐘;使用排程後,摘要會在用戶起牀前備妥。
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady*
What I Built
SlothDigest turns your noisy group chats into two lines.
Line one says what happened. Line two says what to do today.
You paste your chats and press one button. Gemma runs on your own computer and writes the digest. A Python version runs from a scheduler so the digest is ready when you wake up.
Demo
Live site: https://sloth-digest-tqen.onrender.com
The screenshots show a real run on my laptop. The live page talks to Ollama on your own computer. It cannot run a model by itself.
The page finds Ollama and lists your models. It picks Gemma first. A skeleton loader shows while the model works. You can cancel any time. One button wipes everything.
Code
https://github.com/triixdev/Sloth-Digest
How I Built It
Model: Gemma 3 (gemma3:4b) served by Ollama.
Site: plain HTML and CSS and JavaScript. No framework and no build step.
Each chat gets a one sentence summary. A second call turns the summaries into the digest.
Privacy is enforced in the browser. A content security policy lets the page talk to localhost only. A request to any other server is blocked.
Safety is built in. Chat text goes to the model as data. The prompt tells the model to ignore commands hidden inside a chat. Output is shown as plain text so it can never run as code.
The command line script does the same job on a folder of .txt files. It can send timing and token counts to Sentry. It never sends message text.
The repo includes a privacy policy and terms of service. Real chats stay out of git.
Why Does Open Innovation Matter?
Chats hold names and plans and work secrets. They should stay on my machine.
Gemma is open so I run it locally. Nothing is uploaded. There is no key and no bill. It works with the network unplugged.
I can swap the model from a dropdown. A closed API would see every message and charge for each one.
The Lazy Payoff
My three sample chats are tiny. Reading them takes about 20 seconds. SlothDigest took 14 seconds on my laptop.
The saving shows up with real volume. A busy day has about 200 messages. At 12 words each that is 2,400 words. Reading speed is about 240 words per minute. That is 10 minutes of reading.
With a scheduler the digest is ready before I wake up. I read two lines instead.
Prize Categories
Best Use of Gemma
Best Use of Render
來源:DEV Community · dev.to

