Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: GPT–LLM native macOS app with time travel, versioning, search (thellm.app)
12 points by wll on April 11, 2023 | hide | past | favorite | 9 comments
Hey everyone!

I made a Mac app for exploring large language models.

It’s fast, small, has a tiny memory footprint. It’s immutable by design with both immediate time travel and automatic versioning as foundational elements. The app is written in Swift and a bit of Rust for the tokenizer. I used SwiftUI for structure and animations and Cocoa for advanced behavior. All storage is SQLite and local-only. You can go through the database as needed and backup it as well.

The app has support for variants, which is the `n` parameter in the OpenAI chat completion API—equivalent to the drafts feature in Bard. It shows model- and ChatML-aware tokens and cost, and it dynamically adjusts response length in function of prompt length and context length. It supports hiding runs that are not useful, marking the ones that are notable, and going through the ancestry of the current run. It also has support for examples, as specified in ChatML, conversation names and personal and local-only notes. The full-text search works across all stored text and it has support for `all`, `any`, `prefix` and `phrase` matching; the results are time-ordered rather than ranked for the time being. There are several shortcuts and more are coming so that the app can be used entirely by keyboard. You can export to JSON and all data is exported. The app is sandboxed and notarized. The API keys are stored securely in the Keychain.

Next I plan to implement combinatorial runs (mixing multiple values of the same parameter and multiple models as well) and full Markdown support.

Currently only OpenAI’s conversational models are supported (GPT 3.5, GPT 4 8K, GPT 4 32K), but I’ll be adding support for local models and custom ChatML endpoints as soon as possible.

Give it a try. Any and all feedback welcome! Thoughts and questions as well!

William



This is a nicely designed application. I've always struggled to make UIs look good like this, even with SwiftUI which ostensibly should make it easier.

Any tips to share for how to approach SwiftUI code to achieve the sort of aesthetic you've got here?


I think a balance of the classic macOS and iOS experience and app- and function-specific elements are key for the feel.

I made a dozen prototypes and variants over the last month. I iterate as I use the app myself. I keep what feels just right, I improve what I feel is not quite there, I remove what doesn’t work. I make an effort to prioritize function over form while tending to form within and around function: high-density informaton, self-evident controls, haptic feedback, visual cues, and evolving and adapting controls and layout to what feels right. It is taste as much as it is engineering.

SwiftUI does make it easier by an order of magnitude or three. It just needs to be understood for it to work well. It has to mixed with Cocoa and UIKit for native controls and native interactions (such as properly handling a scroll view’s offset).


SwiftUI’s strengths are layout composition, ease of animating, efficient dataflow, value-semantics, ease of changing things up, swapping in and out alternatives while prototyping, interactive hot-reload previews, making custom controls and layouts, and again, the ability to mix and interact with the classic frameworks wherever and whenever needed.

It can be improved in a bunch of ways, but once you’ve bridged the “missing parts” and embraced using it to layout and style and control classic frameworks while handling dataflow, it is just perfect. It is also as efficient as possible or can be made so.


Looks really good. But FYI there is a warning (it says "uncommon file type") when I try to download it on my macbook.

Also I have ChatGPT Plus which gives me 4.0, and also Browsing access. Would be great to access these functionalities in this app.


Mmm. The warning is something I’ve never seen in macOS myself and have been unable to find exact matches around.

As for ChatGPT Plus—that’s on OpenAI, they don’t expose the plugins through the API just yet and guide, moderate, and prompt the base models. Lore is a prompt development tool. Exploring prompts requires nontrivial iterating, adjusting, evaluating, and that’s what I aim to cover for the time being.

On the other hand I am exploring interfaces to LLMs and I see margins to improve the ChatGPT experience. Thanks for the input!


- nicely designed app, great work! - sliders on the right side are very difficult to use, instead of hover to select it would be better as click to select - have some sort of onboarding that lets me know I need to put in my api key


Thanks yousifa! I see, yeah, there’s no expectation for hover sliders, I’ll consider making them drag-only.

What led me to experiment with hover was that three-finger drag is not the default macOS behavior and therefore native controls have to be dragged through click-press, which I always found too cumbersome for how wonderful the MacBook trackpad is.

Good point on the onboarding. I considered prompting for the key on first start, but then I thought one would try to run first or anyway, which is when the field pops up now. I’ll make something that can be then extended to having other providers, custom endpoints, and local models.

Thanks for the feedback! I appreciate it.


I made the parameter sliders hover–and–click. Thanks again!


Very well made app




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: