Type alias CreateTemplate

CreateTemplate: {
    a: ((prompt, options?) => TemplateExpression);
    context: ((system, preprompt?, config?) => CreateTemplateContext);
    prompt: ((prompt, options?) => TemplateExpression);
    the: ((prompt, options?) => TemplateExpression);
}

Template context creator and template creation helpers

Type declaration

Example

const { context, a, prompt } = ad(model)
const assistant = context('You are a helpful assistant')

const template = assistant`{
"petName": "${a('good name for a cat')}",
"hairs": ${prompt('How many hairs does this cat have?')}
}`

Generated using TypeDoc