Hi!
I made a small library which allows using AI models like they were
just a Go function, but that Go function can be:
- defined with natural language description
- example inputs with expected outputs
- or both
Internally, it then calls into an LLM to get the answer. So it is not
fast, but it is an interesting new way to define your functions. Check
it out, any feedback welcome:
https://gitlab.com/tozd/go/fun
Caveat: Current LLMs available still randomly return trash for some
inputs, even if they work great for very similar other inputs. But
hopefully that will improve through time. And there are some ways to
check for this (using JSON Schema to validate outputs, comparing
outputs of multiple models, etc.).
Mitar
--
https://mitar.tnode.com/
https://twitter.com/mitar_m
https://noc.social/@mitar