60 karma · joined Jun 25, 2017 (9y ago) · 28 submissions
comment 1y ago · link · parent
GitHub repo here: https://github.com/mattt/AnyLanguageModel
Happy to answer questions about the implementation or trade-offs we made.
2.
AnyLanguageModel: One API for Local and Remote LLMs on Apple Platforms(huggingface.co ↗)
4 points · by _mattt · 1y ago · 1 comment
comment 1y ago · link · parent
comment 1y ago · link · parent
comment 1y ago · link · parent
comment 1y ago · link · parent
For the Swift standard library and other open-source frameworks, you could probably extract this from documentation comments using DocC, Jazzy, or the like.
comment 1y ago · link · parent
In many cases, a Markdown distillation of HTML can improve the signal-to-noise ratio — especially for sites mired in <div> tag soup (intentionally or not). But that's an optimization for token efficiency; LLMs can usually figure things out.
The motivation behind Sosumi is better understood as a matter of accessibility. The way AI assistants typically fetch content from the web precluded them from getting any useful information from developer.apple.com.
You could start to solve the generalized problem with an MCP that 1) used a headless browser to access content for sites that require JS, and 2) used sampling (i.e. having a tool use the host LLM) to summarize / distill HTML.
comment 1y ago · link · parent
Even for those open source projects, there is still some value added in the generated documentation that isn’t directly available from documentation comments, such as type members and protocol conformances (though a LLM could certainly suss that out with the right context).
comment 1y ago · link · parent
But with these RLHF'd AIs, being confident and helpful as they are, it took me a while to realize that they couldn't actually read the Apple developer links I was giving them. Like a kid who can't read the chalkboard, but doesn't realize they need glasses.
comment 1y ago · link · parent
Apple's ToS pretty explicitly forbid the kind of automation required to download everything. But even if someone did that, it'd only be a snapshot in time. And a lot can can change between OS releases.
As for the hosted web app, I wanted to provide this as a public service. I plan to open source it, so anyone can self-host instead, if they're inclined.
comment 1y ago · link · parent
- https://developer.apple.com/documentation/swift/tasklocal
- https://sosumi.ai/documentation/swiftui/button
- https://sosumi.ai/documentation/foundation/measurement
Most of the docs about the language itself live on swift.org (e.g. https://docs.swift.org/swift-book/documentation/the-swift-pr...). I've had pretty good luck getting Claude to write modern Swift code by saying things like "Use Swift 6 structured concurrency instead of GCD". But I could totally see expanding sosumi to include swift.org content, too.
Edit: Another Swift developer life hack: for new language features, copy-pasting the Swift Evolution proposal works pretty well! https://github.com/swiftlang/swift-evolution/tree/main/propo...
18.
Show HN: Sosumi.ai – Convert Apple Developer docs to AI-readable Markdown(sosumi.ai ↗)
133 points · by _mattt · 1y ago · 72 comments
21.
Show HN: Nominate – a macOS app that renames PDFs based on their contents(github.com ↗)
3 points · by _mattt · 1y ago · discuss
comment 1y ago · link · parent
Thanks! Yeah, having everything just work gives me the same goosebumps that I remember from back in the Web 2.0 days.
One of the next steps for us is to expand emcee beyond just tool use. MCP has concepts [1] for prompts and resources (files, db records, etc.), and it'd be great to support those, too. Right now, emcee creates a 1:1 correspondence between OpenAPI operations and tools, but there should be heuristics or annotations to establish that, say, `GET /prompts/{id}` manages a prompt.
[1]: https://modelcontextprotocol.io/docs/concepts/architecture
comment 1y ago · link · parent
Carl and I are working on a PaaS for deploying agents, and emcee has given us a nice way to quickly prototype these kinds of workflows.
We can take a handful of OpenAPI specs for code deployed on our platform, and have Claude calling tools without any extra setup. That's been really helpful for figuring out how to get the LLM to pick the right tool for the job.
It's also been interesting to see just how far you can get with tool calling on its own. Normally, you have to write some kind of UI or client code to interact with a platform. But with emcee, we've been able to take a tool-driven development approach, using Huma [1] to generate OpenAPI endpoints for our Go web API, and talking to our service first through Claude, before making a UI or SDK.
And to your point, I think MCP could be really powerful as a connection point to various clients, servers, and hosts — a lot like LSP [2] for IDEs and programming languages. I'd love to hook emcee up to Zed, for example, to give the AI assistant even more context to do its thing.
[1]: https://huma.rocks [2]: https://microsoft.github.io/language-server-protocol/
comment 4y ago · link · parent
Adding a semantic line break inherently changes the relationship between words, and we can't always be sure about the intended meaning of text. If this were MUST NOT, then any modification would risk violating the spec.
Then again, this may be my own, idiosyncratic reading of RFC 2119. If you'd like to discuss this further, feel free to open an issue on the GitHub repo here: https://github.com/sembr/specification/issues
26.
Objective-C Direct Methods(nshipster.com ↗)
1 points · by _mattt · 6y ago · discuss