@arizeai/phoenix-evals
Version:
A library for running evaluations for AI use cases
10 lines • 358 B
JavaScript
import Mustache from "mustache";
/**
* A function that applies a set of variables to a template (e.g. a prompt)
* Uses the Mustache library to apply the variables to the template
*/
export function formatTemplate(args) {
const { template, variables } = args;
return Mustache.render(template, variables);
}
//# sourceMappingURL=applyTemplate.js.map