UNPKG

@arizeai/phoenix-evals

Version:

A library for running evaluations for AI use cases

16 lines 642 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.formatTemplate = formatTemplate; const mustache_1 = __importDefault(require("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 */ function formatTemplate(args) { const { template, variables } = args; return mustache_1.default.render(template, variables); } //# sourceMappingURL=applyTemplate.js.map