Show HN: Elelem – TypeScript LLMs with tracing, retries, and type safety (github.com)
Elelem is a simple, opinionated, JSON-typed, and traced LLM framework in TypeScript.
It's a proof of concept but has some nice features:
1. Caching (with Redis)
2. Tracing (with OpenTelemetry)
3. Generated examples of JSON output (using FakerJS), which results in more stable output types.
4. Type-safe
5. Has retry logic baked-in
I'd appreciate any feedback on the interface and would be happy to answer questions for anyone interested in trying it out.
Thanks.
2 comments
[ 3.5 ms ] story [ 18.4 ms ] threadHopefully OpenAI and others will offer something like https://github.com/guidance-ai/guidance at some point to guarantee overall output structure.
Failed validations will retry, but from what I've seen JSONSchema + generated JSON examples are decently reliable in practice for gpt-3.5-turbo and extremely reliable on gpt-4.