Are you sure you want to delete this access key?
This guide demonstrates how to set up a TypeScript configuration for promptfoo using promptfooconfig.ts
.
Note: This example requires Node.js 20 or later.
Before running the evaluation, install the @swc-node/register
package or another suitable TypeScript loader for Node.js:
npm install @swc-node/register
To execute the evaluation, use the following command:
NODE_OPTIONS='--import @swc-node/register/esm-register' promptfoo eval -c examples/ts-config/promptfooconfig.ts
After the evaluation completes, view the results with:
promptfoo view
Currently, Node.js requires external loaders like @swc-node/register
to run TypeScript files directly. However, future versions of Node.js are expected to include native TypeScript support:
--experimental-loader
flag for ES modules, marking progress toward native TypeScript support.Press p or to see the previous file or, n or to see the next file
Browsing data directories saved to S3 is possible with DAGsHub. Let's configure your repository to easily display your data in the context of any commit!
promptfoo is now integrated with AWS S3!
Are you sure you want to delete this access key?
Browsing data directories saved to Google Cloud Storage is possible with DAGsHub. Let's configure your repository to easily display your data in the context of any commit!
promptfoo is now integrated with Google Cloud Storage!
Are you sure you want to delete this access key?
Browsing data directories saved to Azure Cloud Storage is possible with DAGsHub. Let's configure your repository to easily display your data in the context of any commit!
promptfoo is now integrated with Azure Cloud Storage!
Are you sure you want to delete this access key?
Browsing data directories saved to S3 compatible storage is possible with DAGsHub. Let's configure your repository to easily display your data in the context of any commit!
promptfoo is now integrated with your S3 compatible storage!
Are you sure you want to delete this access key?