156 points · by rexec · 2y ago · 31 comments
Notes doesn't really support plugins so I'm using the macOS accessibility API for reading selections and then stream responses using the clipboard (not ideal but it works).
https://gist.github.com/rcarmo/f96c659f149e357e1091cbfe352af...
You can drop the Python script into Automator and use that to publish a Service without tweaking anything else (but of course a proper solution would do some sort of API key management, maybe use the keychain module to retrieve that, etc.)
Still, it was a fun quick hack. Thanks rexec for the inspiration, I'm now looking into doing the same with a simple Lua/Obj-C app to publish the services directly.
With a few tricks you can use LLMs or anything else you can call from a script, from anywhere in your OS via input capture and simulation, and clipboard. And it can be cross platform!
Here's the project, if it might interest anyone.
I highly suspect that the recent Journal app from Apple, which auto-installed via an iOS update, is intended to incentivize users to journal and write about their daily lives, so that when Apple inevitably ships a local LLM on iDevices, there is already a corpus of data for the model to RAG over and use to "understand" the user.
2024
Q1
Monday, January 1, 2024:
- [x] [XYZ] - Review pull request from [Person]
- [x] Investigate error rates for [XYZ] in Sentry
I look back through these documents for two reasons:1. Right now, I have to go back through all of my notes from the past week for engineering sync meetings to assemble a list of completed tasks, then I group them by functional area, and then I write out a little bullet-pointed synopsis that I share with my peers.
2. I use my completed todo lists from the previous year to help fill in my annual performance evaluation. I look back through the entire year for major projects I worked on.
I'd love to speed up both of these processes by pointing an LLM at all of these documents and having it auto-summarize either on a weekly, monthly, quarterly, or yearly basis.
Also, the Notes app on macOS has a reasonably comprehensive AppleScript Dictionary associated with it for scripting; have you considered using osascript with either AppleScript (ugh) or JavaScript to expand your cross-document capabilities?
Using AppleScript/JavaScript to pull multiple notes is a good idea!
Edit: I reworded my question because it was a bit vague.
Notes app seem like an odd place to ask Google like questions.
Is it supposed to help me with writing long for text? Am I supposed to use it as a spell/grammar checker ?
This is not directly a question for your integration, but more of a general question for using local LLMs for long form text.
Asking generic questions is probably a poor demo choice, but it shows the link to the LLM in context.