@twilio-alpha/assistants-eval
Version:
promptfoo extension for writing AI evaluations for Twilio AI Assistants
17 lines • 595 B
JavaScript
import { randomUUID } from 'crypto';
// Caching this at the top level because Promptfoo will call this for every test run
// the only way to make sure that this changes only on a per-run basis is by leveraging
// the fact that this module gets cached when it is first imported.
const CACHED_RUN_ID = `run_${randomUUID()}`;
export function runId(varName) {
if (varName === 'runId') {
return {
output: CACHED_RUN_ID,
};
}
return {
error: 'Invalid variable name. Must use "runId"',
};
}
export default runId;
//# sourceMappingURL=evalRunId.js.map