Breaking
When using promptfoo as a node library, `Assertion` value functions are now invoked with the same args as when using the CLI. See [AssertionValueFunction](https://github.com/promptfoo/promptfoo/pull/674/files#diff-c54113cf61ec99691748a3890bfbeb00e10efb3f0a76f03a0fd9ec49072e410aR404-R421) for type details.
In practice, this change means that instead of:
js
function assertValue(output, testCase, assertion) { ... }
You can do:
js
function assertValue(output, { prompt, vars, test }) { ... }
The reason for this change is that it's confusing that the CLI and library accept different functions, and only the CLI function signature was documented.
What's Changed
* fix!: make `javascript` assert function call consistent with external js function call by typpo in https://github.com/promptfoo/promptfoo/pull/674
* fix: node library supports prompt files by typpo in https://github.com/promptfoo/promptfoo/pull/668
* feat: Enable post-hoc evaluations through defining and using output value in TestSuite by anthonyivn2 in https://github.com/promptfoo/promptfoo/pull/671
* feat: Allow local files to define providerOutput value for TestCase by anthonyivn2 in https://github.com/promptfoo/promptfoo/pull/675
* feat: detect suitable anthropic default provider by typpo in https://github.com/promptfoo/promptfoo/pull/677
* feat: Ability to delete evals by typpo in https://github.com/promptfoo/promptfoo/pull/676
* feat: ability to create derived metrics by typpo in https://github.com/promptfoo/promptfoo/pull/670
New Contributors
* anthonyivn2 made their first contribution in https://github.com/promptfoo/promptfoo/pull/671
**Full Changelog**: https://github.com/promptfoo/promptfoo/compare/0.52.0...0.53.0