Inspiration
Inspired by the tiring scrolling required when your friends make a whole plan without you, and all you really want is a short and sweet summary
What it does
Buffers inbound group messages in a local SQLite file (messages.db). When someone in a group says "summarize past 24 hours", it DMs that person a recap generated by an OpenAI-compatible model. Understands time windows like summarize past 2 hours, 30 minutes, 3 days (defaults to 24 hours). Retains messages for 7 days; older messages are pruned hourly. In a DM, reply ping for a health check.
How we built it
We were able to scrape messages onto our own SQL messages using Spectrum's inbuilt methods. We then use a Gemini API key to quickly acquire our summary before using Spectrum again to send the message in a private DM to the person who requested the summary. We used OpenCode for various processes from troubleshooting to creating the logic
Challenges we ran into
We ran into a major challenge in the fact that the subscription we were provided for Photon's spectrum didn't work in Group Chats, the primary demographic we were targeting so for this proof of concept we were able to route the working of Spectrum framework to use my own number.
Accomplishments that we're proud of
Implementing Spectrum The varying lengths at which you can ask a summary And the efficient code that performs all these tasks
What we learned
How to scrape messages using Spectrum Framework How to send messages using the Spectrum Framework How to use Gemini API keys to connect and summarize our messages How to prune messages of certain time lengths and store the required messages in specialized databases that protect privacy of the user.
What's next for ChatMate
Making it so it works not only on iMessage but RCS and other texting software like Telegram, Whatsapp and Discord.
Built With
- photon
- spectrum
- typescript
Log in or sign up for Devpost to join the conversation.