magic
transmogrifier
magic | transmogrifier | |
---|---|---|
5 | 1 | |
73 | 0 | |
- | - | |
5.4 | 4.7 | |
about 1 year ago | about 1 year ago | |
TypeScript | TypeScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
magic
-
Show HN: MonkeyPatch – Cheap, fast and predictable LLM functions in Python
I built a similar library for Typescript: https://github.com/jumploops/magic
Please note: it requires the use of ttypescript or ts-patch, as Typescript transformers aren’t supported by default!
-
Jsonformer: A bulletproof way to generate structured output from LLMs
I created a toy[0] in Typescript that maps LLM responses to type-safe output.
It uses JSONSchema internally, but I’m thinking of revising it to just use Typescript directly after learning more about the ChatGPT plugin implementation (via their hackathon).
[0]https://github.com/jumploops/magic
- Magic - AI functions for Typescript
- Show HN: AI Functions for TypeScript
transmogrifier
-
Jsonformer: A bulletproof way to generate structured output from LLMs
This is a useful pattern and seems to be discovered by devs after they've played with LLMs for a while.
I called it "transmogrifier" (thanks, Calvin!) and the maybe one interesting twist in my repo [1] is that you define the desired return type using Zod; when you call `transmogrify(...)` it validates the LLM response. If valid, data is returned (and you can use all the nice trappings of typescript from there); if not, an exception is raised.
[1] https://github.com/davepeck/transmogrifier
What are some alternatives?
magic-example - Example of using AI functions in Typescript
jsonformer - A Bulletproof Way to Generate Structured JSON from Language Models
faker - Generate massive amounts of fake data in the browser and node.js
cria - Tiny inference-only implementation of LLaMA
clownfish - Constrained Decoding for LLMs against JSON Schema
Chat-Markup-Language - This is a Repo defining a set of rules for ChatGPT to use when sending responses to a user
relm - ReLM is a Regular Expression engine for Language Models
marvin - ✨ Build AI interfaces that spark joy