gsuuon / ad-llama

Structured inference with Llama 2 in your browser
https://gsuuon.github.io/ad-llama/
MIT License
52 stars 2 forks source link

Template references #3

Closed gsuuon closed 1 year ago

gsuuon commented 1 year ago

Expressions can now reference the results of previous expressions - add an { id: string} to the expression option, and in the consuming expression provide a function which takes ref getter

template`{
  "name": "${a('name', {id: 'name'})}",
  "description": "${ref => a('good description for ' + ref('name'))}"
}`})