70 lines
2.0 KiB
JSON

{
"name": "evals",
"$schema": "../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "evals",
"projectType": "library",
"tags": ["type:evals"],
"targets": {
"setup": {
"executor": "nx:run-commands",
"options": {
"command": "./scripts/setup-evals-env.sh",
"cwd": "{workspaceRoot}"
},
"metadata": {
"description": "Setup evals .env from 1Password"
}
},
"eval": {
"executor": "nx:run-commands",
"options": {
"command": "set -a && [ -f .env ] && source .env && set +a && npx promptfoo eval -c suites/{args.suite}/promptfoo.yaml",
"cwd": "evals"
},
"configurations": {
"all": {
"command": "set -a && [ -f .env ] && source .env && set +a && npx promptfoo eval -c promptfoo.yaml"
}
}
},
"eval:all": {
"executor": "nx:run-commands",
"options": {
"command": "set -a && [ -f .env ] && source .env && set +a && for suite in suites/*/; do npx promptfoo eval -c \"$suite/promptfoo.yaml\" --output \"$suite/results.json\"; done",
"cwd": "evals"
}
},
"eval:view": {
"executor": "nx:run-commands",
"options": {
"command": "npx promptfoo view",
"cwd": "evals"
}
},
"eval:cache-clear": {
"executor": "nx:run-commands",
"options": {
"command": "npx promptfoo cache clear"
}
},
"typecheck": {
"executor": "nx:run-commands",
"options": {
"command": "npx tsc --noEmit -p evals/tsconfig.json"
}
},
"generate-api-docs": {
"executor": "nx:run-commands",
"options": {
"command": "npx typedoc",
"cwd": "{workspaceRoot}"
},
"inputs": ["{projectRoot}/framework/**/*.ts", "{workspaceRoot}/typedoc.json"],
"outputs": ["{workspaceRoot}/docs/api"],
"metadata": {
"description": "Generate API documentation from TypeScript source files using TypeDoc"
}
}
}
}