Skip to content

Commit

Permalink
add redteam invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Feb 10, 2025
1 parent e697408 commit 72b1a55
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions packages/cli/src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,16 +205,15 @@ npx --yes genaiscript@${CORE_VERSION} test view
const { script, configuration } = config
const outJson = configuration.replace(/\.yaml$/, ".res.json")
const cmd = "npx"
const args = [
"--yes",
`promptfoo@${promptFooVersion}`,
"eval",
const args = ["--yes", `promptfoo@${promptFooVersion}`]
if (redteam) args.push("redteam", "run", "--force")
else args.push("eval", "--no-progress-bar")
args.push(
"--config",
configuration,
"--max-concurrency",
String(PROMPTFOO_TEST_MAX_CONCURRENCY),
"--no-progress-bar",
]
String(PROMPTFOO_TEST_MAX_CONCURRENCY)
)
if (options.cache) args.push("--cache")
if (options.verbose) args.push("--verbose")
args.push("--output", outJson)
Expand Down

0 comments on commit 72b1a55

Please sign in to comment.