Skip to content

Test

Runs the tests in scripts using promptfoo.

Terminal window
npx genaiscript test "<scripts...>"

You can override which models to use in the tests using --models:

Terminal window
npx genaiscript test "<scripts...>" --models openai:gpt-4 ollama:phi3

result viewer

Run the test view command to launch the test result viewer:

Terminal window
npx genaiscript test view