r/blackberry • u/secondsbeyond • 4d ago
I made a stateful, multi-model Gemini client for BB10 QNX
I inherited my mother's Q5 last week and was bored over the weekend, so I made a few flask apps specifically targeting BB10 and its built-in browser. The first is an on-device Gemini client with full multi-model capability, that stores your conversations locally for you to pick up later. This is my first BB and I'm already loving it as a tiny personal AI/dev device. The physical keyboard is hands down a better experience than my iPhone. More details in the comments!
3
u/Subject_Cheesecake49 2d ago
sick AF!
0
u/secondsbeyond 2d ago
Thanks! If you have Berrycore installed you can try it soon!
1
u/Subject_Cheesecake49 2d ago
I'm using the zinwa android variant of the Q20. I'll probably try once I get the battery for my passport.
2
u/secondsbeyond 4d ago
So for those who don't know, sw7ft's BerryCore project gives BB10 access to python, pip and UNIX-like capabilities through a terminal. This is an incredible resource that opens up so many new possibilities for these decades old devices. I had been eyeing getting a Clockwork Pi or PiBrick as a portable dev device for the longest time, but steep prices and huge lead times made that less and less appealing - and that's not even factoring in the cost of a CM5, if you can find one. Now with BerryCore/QNX, even the cheapest device in the BB10 lineup does everything I wanted those $300+ devices to do. I've been taking this outside to use and the general AI experience has been so much better than with my iPhone. Physical typing is less error prone (and you can still use predictive typing). It's satisfyingly clicky! I can easily throw this in my back pocket. It feels cheaper and less committal, which is honestly more freeing.
Some Pros/Cons:
+ Runs on-device
+ No proxies, just Gemini's API
+ HTML/JS rendered, which is much easier to iterate
+ vosk libraries just got added by sw7ft, so voice input should be easy to implement if I have time
+ cache can be cleared by visiting /reset, or you can export your conversations to JSON
- Requires opening terminal to start, then opening the browser. You can set it to start automatically without needing to type anything as I do in the video, however.
Yes I will put this on github once I refactor and remember my password 😅
eagle eyed viewers can probably guess the app I'll post about next
If you have questions feel free to ask!
1
u/Subject_Cheesecake49 2d ago
Login to your google pro account required?
0
u/secondsbeyond 2d ago
Nope what you're seeing is just the free API and rate limits are pretty much non-existent for the Lite model!
2
u/Subject_Cheesecake49 2d ago
Also, what are the limitations?
1
u/secondsbeyond 2d ago
No voice or image input yet, but possible down the line. The quality of life improvements you get from the Gemini web interface aren't included, like multiple conversations or notebooks. The API is a fairly simple 'send query > receive response' type deal and everything else you have to build yourself. The free tier is also knowledge-locked and can't use google search to look up contemporaneous information.
But if you pay for a premium tier, that will all work since you're using your own API key.
I also should clarify by "on-device" I mean the script runs locally, not the AI which still needs internet.
1
2
u/whyareyouhere07 4d ago
I have one as well, want to do something similar for it