from Hacker News

Show HN: Elelem – TypeScript LLMs with tracing, retries, and type safety

by jrhizor on 10/12/23, 11:45 PM with 2 comments

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.

  • by gsuuon on 10/13/23, 4:42 PM

    I like the integrated telemetry and caching. It looks like the prompt formatter adds text to the system instruction - have you tried using function calling to get json responses? Does the retry mechanism validate against the zod schema?