jkomoros / prompt-garden

A framework for gardening LLM prompts
Apache License 2.0
13 stars 1 forks source link

Support meta-nodes #20

Open jkomoros opened 1 year ago

jkomoros commented 1 year ago

Maybe meta-nodes should be seed packets, with a defined '' entrypoint

This can be covered (mostly) by having a let with a seed-reference to the sub-seed, and then the sub-seed uses var within. But that's confusing about ways to use it and which variables it expects to be set.

Perhaps some kind of special parameter on a seed that describes the environment it expects to be set? And then there can be some tooling to complain if those aren't set. (or it could just be convention, a utility seed of expect which takes an object, and then verifies that getting the var for each is not undefined.)

the convention is to pass parameters with an arg: prefix.

Ideally there'd be more than just convention, so there could be toolnig around it.

E.g. a call seed, which is basically a let-multi with a nested seed reference for block. And a function seed type that is basically an expect node but with a defined set of parameters and defaults. These don't do anything semantically except make it very clear to tooling what the intention is, allowing listing them as entrypoints, detecing missing parameters, etc.

function should have an array of arguments, prefixed with arg:, calle dargs. And defaults, which are a subset of args. And any that don't have defaults are required and will throw.

Should call require the arg: namespace or not?