promptfoo 0.87.1 → 0.89.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/package.json +29 -29
- package/dist/src/__mocks__/esm.d.ts.map +1 -1
- package/dist/src/__mocks__/esm.js +1 -0
- package/dist/src/__mocks__/esm.js.map +1 -1
- package/dist/src/app/assets/index-DQ5S2Ye6.js +782 -0
- package/dist/src/app/assets/index-Dl-FhnW1.css +1 -0
- package/dist/src/app/assets/index.es-DR-0y8vm.js +18 -0
- package/dist/src/app/assets/purify.es-DGIRlouP.js +3 -0
- package/dist/src/app/assets/sync-D_jwcTYY.js +4 -0
- package/dist/src/app/favicon.png +0 -0
- package/dist/src/app/index.html +16 -0
- package/dist/src/assertions/AssertionsResult.d.ts.map +1 -1
- package/dist/src/assertions/AssertionsResult.js +7 -0
- package/dist/src/assertions/AssertionsResult.js.map +1 -1
- package/dist/src/assertions.d.ts.map +1 -1
- package/dist/src/assertions.js +19 -4
- package/dist/src/assertions.js.map +1 -1
- package/dist/src/cache.js +1 -1
- package/dist/src/cache.js.map +1 -1
- package/dist/src/commands/cache.js +2 -2
- package/dist/src/commands/cache.js.map +1 -1
- package/dist/src/commands/delete.js +2 -2
- package/dist/src/commands/delete.js.map +1 -1
- package/dist/src/commands/eval.d.ts +1 -1
- package/dist/src/commands/eval.d.ts.map +1 -1
- package/dist/src/commands/eval.js +17 -3
- package/dist/src/commands/eval.js.map +1 -1
- package/dist/src/commands/generate/dataset.js +1 -1
- package/dist/src/commands/generate/dataset.js.map +1 -1
- package/dist/src/commands/list.js +3 -3
- package/dist/src/commands/list.js.map +1 -1
- package/dist/src/commands/share.js +2 -2
- package/dist/src/commands/share.js.map +1 -1
- package/dist/src/commands/show.js +1 -1
- package/dist/src/commands/show.js.map +1 -1
- package/dist/src/commands/view.js +2 -2
- package/dist/src/commands/view.js.map +1 -1
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/config.js +47 -57
- package/dist/src/config.js.map +1 -1
- package/dist/src/csv.d.ts.map +1 -1
- package/dist/src/csv.js +40 -15
- package/dist/src/csv.js.map +1 -1
- package/dist/src/database/tables.d.ts +18 -18
- package/dist/src/envars.d.ts +1 -0
- package/dist/src/envars.d.ts.map +1 -1
- package/dist/src/envars.js.map +1 -1
- package/dist/src/evaluator.d.ts.map +1 -1
- package/dist/src/evaluator.js +32 -0
- package/dist/src/evaluator.js.map +1 -1
- package/dist/src/evaluatorHelpers.js +1 -1
- package/dist/src/evaluatorHelpers.js.map +1 -1
- package/dist/src/globalConfig.js +1 -1
- package/dist/src/globalConfig.js.map +1 -1
- package/dist/src/golang/wrapper.go +53 -0
- package/dist/src/main.d.ts.map +1 -1
- package/dist/src/main.js +5 -11
- package/dist/src/main.js.map +1 -1
- package/dist/src/onboarding.d.ts +1 -1
- package/dist/src/onboarding.d.ts.map +1 -1
- package/dist/src/onboarding.js +4 -2
- package/dist/src/onboarding.js.map +1 -1
- package/dist/src/providers/ai21.d.ts.map +1 -1
- package/dist/src/providers/ai21.js +3 -12
- package/dist/src/providers/ai21.js.map +1 -1
- package/dist/src/providers/anthropic.d.ts +3 -3
- package/dist/src/providers/anthropic.d.ts.map +1 -1
- package/dist/src/providers/anthropic.js +44 -34
- package/dist/src/providers/anthropic.js.map +1 -1
- package/dist/src/providers/azureopenai.d.ts +3 -2
- package/dist/src/providers/azureopenai.d.ts.map +1 -1
- package/dist/src/providers/azureopenai.js +129 -3
- package/dist/src/providers/azureopenai.js.map +1 -1
- package/dist/src/providers/bedrock.js +2 -2
- package/dist/src/providers/bedrock.js.map +1 -1
- package/dist/src/providers/cloudflare-ai.d.ts +2 -2
- package/dist/src/providers/cloudflare-ai.d.ts.map +1 -1
- package/dist/src/providers/cloudflare-ai.js.map +1 -1
- package/dist/src/providers/cohere.js +1 -1
- package/dist/src/providers/cohere.js.map +1 -1
- package/dist/src/providers/golangCompletion.d.ts +19 -0
- package/dist/src/providers/golangCompletion.d.ts.map +1 -0
- package/dist/src/providers/golangCompletion.js +105 -0
- package/dist/src/providers/golangCompletion.js.map +1 -0
- package/dist/src/providers/http.js +1 -1
- package/dist/src/providers/http.js.map +1 -1
- package/dist/src/providers/mistral.d.ts.map +1 -1
- package/dist/src/providers/mistral.js +8 -18
- package/dist/src/providers/mistral.js.map +1 -1
- package/dist/src/providers/openai.d.ts +13 -0
- package/dist/src/providers/openai.d.ts.map +1 -1
- package/dist/src/providers/openai.js +28 -24
- package/dist/src/providers/openai.js.map +1 -1
- package/dist/src/providers/openaiUtil.d.ts.map +1 -1
- package/dist/src/providers/openaiUtil.js +1 -1
- package/dist/src/providers/openaiUtil.js.map +1 -1
- package/dist/src/providers/shared.d.ts +41 -0
- package/dist/src/providers/shared.d.ts.map +1 -1
- package/dist/src/providers/shared.js +44 -0
- package/dist/src/providers/shared.js.map +1 -1
- package/dist/src/providers/vertexUtil.js +2 -2
- package/dist/src/providers/vertexUtil.js.map +1 -1
- package/dist/src/providers.d.ts.map +1 -1
- package/dist/src/providers.js +5 -0
- package/dist/src/providers.js.map +1 -1
- package/dist/src/python/execAsync.d.ts +10 -0
- package/dist/src/python/execAsync.d.ts.map +1 -0
- package/dist/src/python/execAsync.js +17 -0
- package/dist/src/python/execAsync.js.map +1 -0
- package/dist/src/python/pythonUtils.d.ts +29 -0
- package/dist/src/python/pythonUtils.d.ts.map +1 -1
- package/dist/src/python/pythonUtils.js +85 -6
- package/dist/src/python/pythonUtils.js.map +1 -1
- package/dist/src/python/wrapper.d.ts.map +1 -1
- package/dist/src/python/wrapper.js +8 -5
- package/dist/src/python/wrapper.js.map +1 -1
- package/dist/src/{commands/redteam → redteam/commands}/generate.d.ts +1 -1
- package/dist/src/redteam/commands/generate.d.ts.map +1 -0
- package/dist/src/{commands/redteam → redteam/commands}/generate.js +14 -14
- package/dist/src/redteam/commands/generate.js.map +1 -0
- package/dist/src/redteam/commands/init.d.ts.map +1 -0
- package/dist/src/{commands/redteam → redteam/commands}/init.js +23 -15
- package/dist/src/redteam/commands/init.js.map +1 -0
- package/dist/src/{commands/redteam → redteam/commands}/plugins.d.ts.map +1 -1
- package/dist/src/{commands/redteam → redteam/commands}/plugins.js +1 -1
- package/dist/src/{commands/redteam → redteam/commands}/plugins.js.map +1 -1
- package/dist/src/redteam/constants.d.ts.map +1 -1
- package/dist/src/redteam/constants.js +16 -22
- package/dist/src/redteam/constants.js.map +1 -1
- package/dist/src/redteam/index.d.ts +1 -1
- package/dist/src/redteam/index.d.ts.map +1 -1
- package/dist/src/redteam/index.js.map +1 -1
- package/dist/src/redteam/providers/crescendo/index.js +2 -2
- package/dist/src/redteam/providers/crescendo/index.js.map +1 -1
- package/dist/src/redteam/providers/prompts.d.ts.map +1 -1
- package/dist/src/redteam/providers/prompts.js +23 -0
- package/dist/src/redteam/providers/prompts.js.map +1 -1
- package/dist/src/{types/redteam.d.ts → redteam/types.d.ts} +1 -1
- package/dist/src/redteam/types.d.ts.map +1 -0
- package/dist/src/{types/redteam.js → redteam/types.js} +1 -1
- package/dist/src/redteam/types.js.map +1 -0
- package/dist/src/server/server.d.ts.map +1 -1
- package/dist/src/server/server.js +10 -3
- package/dist/src/server/server.js.map +1 -1
- package/dist/src/share.js +1 -1
- package/dist/src/share.js.map +1 -1
- package/dist/src/suggestions.js +1 -1
- package/dist/src/suggestions.js.map +1 -1
- package/dist/src/telemetry.d.ts.map +1 -1
- package/dist/src/telemetry.js +3 -1
- package/dist/src/telemetry.js.map +1 -1
- package/dist/src/testCases.d.ts.map +1 -1
- package/dist/src/testCases.js +4 -3
- package/dist/src/testCases.js.map +1 -1
- package/dist/src/types/index.d.ts +413 -231
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/src/types/index.js +12 -2
- package/dist/src/types/index.js.map +1 -1
- package/dist/src/util/index.d.ts +19 -5
- package/dist/src/util/index.d.ts.map +1 -1
- package/dist/src/util/index.js +5 -3
- package/dist/src/util/index.js.map +1 -1
- package/dist/src/util/json.js +2 -2
- package/dist/src/util/json.js.map +1 -1
- package/dist/src/validators/prompts.d.ts +2 -2
- package/dist/src/validators/providers.d.ts +166 -20
- package/dist/src/validators/providers.d.ts.map +1 -1
- package/dist/src/validators/providers.js +5 -5
- package/dist/src/validators/providers.js.map +1 -1
- package/dist/src/validators/redteam.d.ts +15 -15
- package/dist/test/assertions.test.js +49 -0
- package/dist/test/assertions.test.js.map +1 -1
- package/dist/test/config.test.js +192 -48
- package/dist/test/config.test.js.map +1 -1
- package/dist/test/csv.test.js +84 -0
- package/dist/test/csv.test.js.map +1 -1
- package/dist/test/envars.test.js +103 -0
- package/dist/test/envars.test.js.map +1 -1
- package/dist/test/matchers.test.js +5 -5
- package/dist/test/matchers.test.js.map +1 -1
- package/dist/test/providers.anthropic.test.js +93 -23
- package/dist/test/providers.anthropic.test.js.map +1 -1
- package/dist/test/providers.azure.test.js +42 -0
- package/dist/test/providers.azure.test.js.map +1 -1
- package/dist/test/providers.bedrock.test.js +2 -1
- package/dist/test/providers.bedrock.test.js.map +1 -1
- package/dist/test/providers.shared.test.d.ts +2 -0
- package/dist/test/providers.shared.test.d.ts.map +1 -0
- package/dist/test/providers.shared.test.js +92 -0
- package/dist/test/providers.shared.test.js.map +1 -0
- package/dist/test/providers.test.js +112 -7
- package/dist/test/providers.test.js.map +1 -1
- package/dist/test/python/pythonUtils.test.d.ts +2 -0
- package/dist/test/python/pythonUtils.test.d.ts.map +1 -0
- package/dist/test/python/pythonUtils.test.js +224 -0
- package/dist/test/python/pythonUtils.test.js.map +1 -0
- package/dist/test/python/wrapper.test.d.ts +2 -0
- package/dist/test/python/wrapper.test.d.ts.map +1 -0
- package/dist/test/python/wrapper.test.js +71 -0
- package/dist/test/python/wrapper.test.js.map +1 -0
- package/dist/test/rateLimit.test.js.map +1 -1
- package/dist/test/redteam/commands/generate.test.d.ts.map +1 -0
- package/dist/test/{commands/redteam → redteam/commands}/generate.test.js +1 -1
- package/dist/test/{commands/redteam → redteam/commands}/generate.test.js.map +1 -1
- package/dist/test/redteam/validators.test.js +2 -2
- package/dist/test/redteam/validators.test.js.map +1 -1
- package/dist/test/testCases.test.js +75 -27
- package/dist/test/testCases.test.js.map +1 -1
- package/dist/test/types.test.js +17 -10
- package/dist/test/types.test.js.map +1 -1
- package/dist/test/util.test.js +10 -0
- package/dist/test/util.test.js.map +1 -1
- package/package.json +29 -29
- package/dist/src/commands/redteam/generate.d.ts.map +0 -1
- package/dist/src/commands/redteam/generate.js.map +0 -1
- package/dist/src/commands/redteam/init.d.ts.map +0 -1
- package/dist/src/commands/redteam/init.js.map +0 -1
- package/dist/src/types/redteam.d.ts.map +0 -1
- package/dist/src/types/redteam.js.map +0 -1
- package/dist/src/web/nextui/404/index.html +0 -1
- package/dist/src/web/nextui/404.html +0 -1
- package/dist/src/web/nextui/_next/static/chunks/113-c691bf7d3a37d865.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/132-d6bea93785831786.js +0 -6
- package/dist/src/web/nextui/_next/static/chunks/15.306496fdcef5f880.js +0 -52
- package/dist/src/web/nextui/_next/static/chunks/167-744b9f585d2d97f7.js +0 -54
- package/dist/src/web/nextui/_next/static/chunks/189-f9d565af9a2b91cb.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/1a53ab81-5e1a018996226f61.js +0 -6
- package/dist/src/web/nextui/_next/static/chunks/235-2bbcbc3cd37eef0f.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/285-1e2a6158b5f0e918.js +0 -32
- package/dist/src/web/nextui/_next/static/chunks/407.42b5daf65ab5dde9.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/417-cbf95fe2bc362650.js +0 -2
- package/dist/src/web/nextui/_next/static/chunks/461-77257ab6b1bb209d.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/565431e5-7b9122ac20f7a0ae.js +0 -140
- package/dist/src/web/nextui/_next/static/chunks/631-d005608c3710a99c.js +0 -6
- package/dist/src/web/nextui/_next/static/chunks/640-0f757e2fe135173d.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/646-62a1d1d5b397d18f.js +0 -28
- package/dist/src/web/nextui/_next/static/chunks/730-3eb7255cd813a727.js +0 -25
- package/dist/src/web/nextui/_next/static/chunks/782-910eb0e09b818816.js +0 -35
- package/dist/src/web/nextui/_next/static/chunks/840.58dde6630f088da4.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/854-c18aaae33bccdc36.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/86-fcb0efd0a19bac7d.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/874-66f90697795eddbc.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/88-f3a7a858d5f4e9a0.js +0 -17
- package/dist/src/web/nextui/_next/static/chunks/887.028187fb318c3e59.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/906-70c43cd62b2efac1.js +0 -97
- package/dist/src/web/nextui/_next/static/chunks/972-15d1ab608a24eebf.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/975-db84f98b8dd028ab.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/a5c829b0-07a2c92898a6780c.js +0 -14
- package/dist/src/web/nextui/_next/static/chunks/app/auth/login/page-c1dbf0abc580796f.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/app/auth/signup/page-93b80ab19bdaf2cc.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/app/datasets/page-17e6d3f57945f88a.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/app/eval/[id]/not-found-dc8b4f57fd363c1b.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/app/eval/[id]/page-1e54704d75f36e25.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/app/eval/page-5295461188ef9b43.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/app/layout-e465aaafbfe88e82.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/app/page-81e3b8fee37eaf67.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/app/progress/page-ac2f99c11e76f5a5.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/app/prompts/page-296c32f480e84a57.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/app/report/page-f7c9e46492061e19.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/app/setup/page-35c95dd67114a045.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/b6261da7-e9d81a4364ddd0c0.js +0 -9
- package/dist/src/web/nextui/_next/static/chunks/fd57813c.8f0e3582250c76c5.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/framework-c3d480eb9ad30ba5.js +0 -25
- package/dist/src/web/nextui/_next/static/chunks/main-6b1ff2291a752212.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/main-app-0dc90092cd7acaaf.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/pages/_app-998b254a061422d4.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/pages/_error-94f0db477e27e000.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/webpack-452ae8c28379ed4c.js +0 -1
- package/dist/src/web/nextui/_next/static/css/48d388184a2f4ce3.css +0 -1
- package/dist/src/web/nextui/_next/static/css/4d76d7cdd9492e1d.css +0 -1
- package/dist/src/web/nextui/_next/static/css/8119d8bd13a8adab.css +0 -1
- package/dist/src/web/nextui/_next/static/css/87b5e6e04efd27e5.css +0 -1
- package/dist/src/web/nextui/_next/static/css/de0307797e31a3e6.css +0 -1
- package/dist/src/web/nextui/_next/static/css/eb523daddb89dfc1.css +0 -1
- package/dist/src/web/nextui/_next/static/css/edcd6f0b6c902fde.css +0 -1
- package/dist/src/web/nextui/_next/static/gtTJhFvE95U20UjbnSnMr/_buildManifest.js +0 -1
- package/dist/src/web/nextui/_next/static/gtTJhFvE95U20UjbnSnMr/_ssgManifest.js +0 -1
- package/dist/src/web/nextui/_next/static/media/26a46d62cd723877-s.woff2 +0 -0
- package/dist/src/web/nextui/_next/static/media/55c55f0601d81cf3-s.woff2 +0 -0
- package/dist/src/web/nextui/_next/static/media/581909926a08bbc8-s.woff2 +0 -0
- package/dist/src/web/nextui/_next/static/media/6d93bde91c0c2823-s.woff2 +0 -0
- package/dist/src/web/nextui/_next/static/media/97e0cb1ae144a2a9-s.woff2 +0 -0
- package/dist/src/web/nextui/_next/static/media/a34f9d1faa5f3315-s.p.woff2 +0 -0
- package/dist/src/web/nextui/_next/static/media/df0a9ae256c0569c-s.woff2 +0 -0
- package/dist/src/web/nextui/android-chrome-192x192.png +0 -0
- package/dist/src/web/nextui/android-chrome-512x512.png +0 -0
- package/dist/src/web/nextui/apple-touch-icon.png +0 -0
- package/dist/src/web/nextui/auth/callback +0 -1
- package/dist/src/web/nextui/auth/login/index.html +0 -1
- package/dist/src/web/nextui/auth/login/index.txt +0 -10
- package/dist/src/web/nextui/auth/signup/index.html +0 -1
- package/dist/src/web/nextui/auth/signup/index.txt +0 -10
- package/dist/src/web/nextui/browserconfig.xml +0 -9
- package/dist/src/web/nextui/datasets/index.html +0 -1
- package/dist/src/web/nextui/datasets/index.txt +0 -10
- package/dist/src/web/nextui/eval/index.html +0 -1
- package/dist/src/web/nextui/eval/index.txt +0 -12
- package/dist/src/web/nextui/index.html +0 -1
- package/dist/src/web/nextui/index.txt +0 -11
- package/dist/src/web/nextui/logo.svg +0 -30
- package/dist/src/web/nextui/mstile-144x144.png +0 -0
- package/dist/src/web/nextui/mstile-150x150.png +0 -0
- package/dist/src/web/nextui/mstile-310x150.png +0 -0
- package/dist/src/web/nextui/mstile-310x310.png +0 -0
- package/dist/src/web/nextui/mstile-70x70.png +0 -0
- package/dist/src/web/nextui/progress/index.html +0 -1
- package/dist/src/web/nextui/progress/index.txt +0 -10
- package/dist/src/web/nextui/prompts/index.html +0 -1
- package/dist/src/web/nextui/prompts/index.txt +0 -10
- package/dist/src/web/nextui/report/index.html +0 -1
- package/dist/src/web/nextui/report/index.txt +0 -12
- package/dist/src/web/nextui/safari-pinned-tab.svg +0 -68
- package/dist/src/web/nextui/setup/index.html +0 -1
- package/dist/src/web/nextui/setup/index.txt +0 -12
- package/dist/src/web/nextui/site.webmanifest +0 -19
- package/dist/test/commands/redteam/generate.test.d.ts.map +0 -1
- package/dist/test/pythonWrapper.test.d.ts +0 -2
- package/dist/test/pythonWrapper.test.d.ts.map +0 -1
- package/dist/test/pythonWrapper.test.js +0 -99
- package/dist/test/pythonWrapper.test.js.map +0 -1
- /package/dist/src/{web/nextui/logo-panda.svg → app/assets/logo-panda-BuYvzEyb.svg} +0 -0
- /package/dist/src/{web/nextui → app}/favicon-16x16.png +0 -0
- /package/dist/src/{web/nextui → app}/favicon-32x32.png +0 -0
- /package/dist/src/{web/nextui → app}/favicon.ico +0 -0
- /package/dist/src/{commands/redteam → redteam/commands}/init.d.ts +0 -0
- /package/dist/src/{commands/redteam → redteam/commands}/plugins.d.ts +0 -0
- /package/dist/test/{commands/redteam → redteam/commands}/generate.test.d.ts +0 -0
package/README.md
CHANGED
|
@@ -35,7 +35,7 @@ It works on the command line too:
|
|
|
35
35
|
|
|
36
36
|
It also produces high-level vulnerability and risk reports:
|
|
37
37
|
|
|
38
|
-

|
|
39
39
|
|
|
40
40
|
## Why choose promptfoo?
|
|
41
41
|
|
|
@@ -181,7 +181,7 @@ prompts:
|
|
|
181
181
|
- file://prompts.txt
|
|
182
182
|
providers:
|
|
183
183
|
- openai:gpt-4o-mini
|
|
184
|
-
tests: tests.csv
|
|
184
|
+
tests: file://tests.csv
|
|
185
185
|
```
|
|
186
186
|
|
|
187
187
|
See [example CSV](https://github.com/promptfoo/promptfoo/blob/main/examples/simple-test/tests.csv).
|
|
@@ -414,7 +414,7 @@ cd path/to/experiment-with-promptfoo # contains your promptfooconfig.yaml
|
|
|
414
414
|
npx path/to/promptfoo-source eval
|
|
415
415
|
```
|
|
416
416
|
|
|
417
|
-
The web UI is located in `src/
|
|
417
|
+
The web UI is located in `src/app`. To run it in dev mode, run `npm run local:app`. This will host the web UI at http://localhost:3000. The web UI expects `promptfoo view` to be running separately.
|
|
418
418
|
|
|
419
419
|
Then run:
|
|
420
420
|
|
package/dist/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "promptfoo",
|
|
3
3
|
"description": "LLM eval & testing toolkit",
|
|
4
4
|
"author": "Ian Webster",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.89.0",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "commonjs",
|
|
8
8
|
"repository": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"workspaces": [
|
|
20
|
-
"src/
|
|
20
|
+
"src/app",
|
|
21
21
|
"site"
|
|
22
22
|
],
|
|
23
23
|
"types": "dist/src/index.d.ts",
|
|
@@ -38,25 +38,24 @@
|
|
|
38
38
|
"f": "git diff --name-only --diff-filter=ACMRTUXB origin/main | grep -E '\\.(js|jsx|mjs|cjs|ts|tsx|json|css|scss|html|md|yaml|yml)$' | xargs prettier --write",
|
|
39
39
|
"lint": "eslint . --max-warnings=0",
|
|
40
40
|
"local": "ts-node --cwdMode --transpileOnly src/main.ts",
|
|
41
|
-
"local:web": "npm run dev --prefix src/
|
|
42
|
-
"install:nextui": "npm install --prefix src/web/nextui",
|
|
41
|
+
"local:web": "npm run dev --prefix src/app",
|
|
43
42
|
"build:clean": "shx rm -rf dist",
|
|
44
|
-
"build:
|
|
43
|
+
"build:app": "npm run build --prefix src/app",
|
|
45
44
|
"build:watch": "tsc --watch",
|
|
46
|
-
"build": "tsc && shx cp src/*.html dist/src && shx cp src/python/wrapper.py dist/src/python && shx rm -rf dist/drizzle && shx cp -r drizzle dist/drizzle && npm run build:
|
|
45
|
+
"build": "tsc && shx cp src/*.html dist/src && shx cp src/python/wrapper.py dist/src/python && shx mkdir -p dist/src/golang && shx cp src/golang/wrapper.go dist/src/golang && shx rm -rf dist/drizzle && shx cp -r drizzle dist/drizzle && npm run build:app && shx chmod +x dist/src/main.js",
|
|
47
46
|
"test": "jest",
|
|
48
47
|
"test:watch": "jest --watch",
|
|
49
|
-
"test:
|
|
48
|
+
"test:app": "npm run test --prefix src/app",
|
|
50
49
|
"format": "prettier -w .",
|
|
51
50
|
"format:check": "prettier --check .",
|
|
52
51
|
"db:migrate": "npx tsx src/migrate.ts",
|
|
53
52
|
"db:generate": "npx drizzle-kit generate",
|
|
54
53
|
"jsonSchema:generate": "npx -y tsx scripts/generateJsonSchema.ts > site/static/config-schema.json",
|
|
55
|
-
"audit:fix": "npm audit fix && npm audit fix --prefix src/
|
|
54
|
+
"audit:fix": "npm audit fix && npm audit fix --prefix src/app && npm audit fix --prefix site",
|
|
56
55
|
"prepublishOnly": "npm run build:clean && npm run build",
|
|
57
56
|
"dev:server": "nodemon src/server/index.ts",
|
|
58
|
-
"dev:
|
|
59
|
-
"dev": "concurrently \"npm run dev:server\" \"npm run dev:
|
|
57
|
+
"dev:app": "npm run dev --prefix src/app",
|
|
58
|
+
"dev": "concurrently \"npm run dev:server\" \"npm run dev:app\""
|
|
60
59
|
},
|
|
61
60
|
"overrides": {
|
|
62
61
|
"uri-js": "npm:uri-js-replace",
|
|
@@ -75,12 +74,12 @@
|
|
|
75
74
|
"node-sql-parser": "^5.2.0"
|
|
76
75
|
},
|
|
77
76
|
"devDependencies": {
|
|
78
|
-
"@aws-sdk/client-bedrock-runtime": "^3.
|
|
77
|
+
"@aws-sdk/client-bedrock-runtime": "^3.651.1",
|
|
79
78
|
"@azure/identity": "^4.4.1",
|
|
80
|
-
"@eslint/js": "^9.
|
|
81
|
-
"@libsql/client": "^0.
|
|
79
|
+
"@eslint/js": "^9.10.0",
|
|
80
|
+
"@libsql/client": "^0.11.0",
|
|
82
81
|
"@swc/cli": "^0.4.0",
|
|
83
|
-
"@swc/core": "^1.7.
|
|
82
|
+
"@swc/core": "^1.7.26",
|
|
84
83
|
"@swc/jest": "^0.2.36",
|
|
85
84
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
86
85
|
"@types/async": "^3.2.24",
|
|
@@ -95,7 +94,7 @@
|
|
|
95
94
|
"@types/express": "^4.17.21",
|
|
96
95
|
"@types/glob": "^8.1.0",
|
|
97
96
|
"@types/inquirer": "^9.0.7",
|
|
98
|
-
"@types/jest": "^29.5.
|
|
97
|
+
"@types/jest": "^29.5.13",
|
|
99
98
|
"@types/js-yaml": "^4.0.9",
|
|
100
99
|
"@types/node-fetch": "^2.6.11",
|
|
101
100
|
"@types/nunjucks": "^3.2.6",
|
|
@@ -107,16 +106,14 @@
|
|
|
107
106
|
"concurrently": "^8.2.2",
|
|
108
107
|
"drizzle-kit": "^0.24.2",
|
|
109
108
|
"esbuild": "^0.23.1",
|
|
110
|
-
"eslint": "^
|
|
111
|
-
"eslint-plugin-jest": "28.
|
|
112
|
-
"eslint-plugin-react-hooks": "
|
|
109
|
+
"eslint": "^9.10.0",
|
|
110
|
+
"eslint-plugin-jest": "^28.8.3",
|
|
111
|
+
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
|
|
113
112
|
"eslint-plugin-unicorn": "^55.0.0",
|
|
114
|
-
"eslint-plugin-unused-imports": "^
|
|
113
|
+
"eslint-plugin-unused-imports": "^4.1.4",
|
|
115
114
|
"jest": "^29.7.0",
|
|
116
115
|
"jest-watch-typeahead": "^2.2.2",
|
|
117
116
|
"madge": "^8.0.0",
|
|
118
|
-
"nexe": "^4.0.0-rc.6",
|
|
119
|
-
"next": "13.4.13",
|
|
120
117
|
"nock": "^13.5.5",
|
|
121
118
|
"nodemon": "^3.1.4",
|
|
122
119
|
"prettier": "^3.3.3",
|
|
@@ -124,17 +121,20 @@
|
|
|
124
121
|
"ts-node": "^10.9.2",
|
|
125
122
|
"tsconfig-paths": "^4.2.0",
|
|
126
123
|
"typescript": "^5.6.2",
|
|
127
|
-
"typescript-eslint": "^
|
|
128
|
-
"zod-to-json-schema": "^3.23.
|
|
124
|
+
"typescript-eslint": "^8.6.0",
|
|
125
|
+
"zod-to-json-schema": "^3.23.3"
|
|
129
126
|
},
|
|
130
127
|
"dependencies": {
|
|
131
|
-
"@anthropic-ai/sdk": "^0.27.
|
|
128
|
+
"@anthropic-ai/sdk": "^0.27.3",
|
|
132
129
|
"@apidevtools/json-schema-ref-parser": "^11.7.0",
|
|
130
|
+
"@emotion/react": "^11.13.3",
|
|
131
|
+
"@emotion/styled": "^11.13.0",
|
|
133
132
|
"@googleapis/sheets": "^9.3.1",
|
|
133
|
+
"@mui/material": "^6.1.0",
|
|
134
134
|
"ajv": "^8.17.1",
|
|
135
135
|
"ajv-formats": "^3.0.1",
|
|
136
136
|
"async": "^3.2.6",
|
|
137
|
-
"better-sqlite3": "^11.
|
|
137
|
+
"better-sqlite3": "^11.3.0",
|
|
138
138
|
"cache-manager": "^4.1.0",
|
|
139
139
|
"cache-manager-fs-hash": "^1.0.0",
|
|
140
140
|
"chalk": "^4.1.2",
|
|
@@ -150,23 +150,23 @@
|
|
|
150
150
|
"dedent": "^1.5.3",
|
|
151
151
|
"dotenv": "^16.4.5",
|
|
152
152
|
"drizzle-orm": "^0.33.0",
|
|
153
|
-
"express": "^4.
|
|
153
|
+
"express": "^4.21.0",
|
|
154
154
|
"fast-deep-equal": "^3.1.3",
|
|
155
155
|
"fast-xml-parser": "^4.5.0",
|
|
156
156
|
"fastest-levenshtein": "^1.0.16",
|
|
157
157
|
"glob": "^10.4.3",
|
|
158
158
|
"groq-sdk": "^0.7.0",
|
|
159
|
-
"inquirer": "^10.2.
|
|
159
|
+
"inquirer": "^10.2.2",
|
|
160
160
|
"js-rouge": "3.0.0",
|
|
161
161
|
"js-yaml": "^4.1.0",
|
|
162
162
|
"mathjs": "^13.1.1",
|
|
163
163
|
"node-fetch": "^2.6.7",
|
|
164
164
|
"nunjucks": "^3.2.4",
|
|
165
|
-
"openai": "^4.
|
|
165
|
+
"openai": "^4.61.0",
|
|
166
166
|
"opener": "^1.5.2",
|
|
167
167
|
"proxy-agent": "^6.4.0",
|
|
168
168
|
"python-shell": "^5.0.0",
|
|
169
|
-
"replicate": "^0.
|
|
169
|
+
"replicate": "^0.33.0",
|
|
170
170
|
"rfdc": "^1.4.1",
|
|
171
171
|
"semver": "^7.6.3",
|
|
172
172
|
"socket.io": "^4.7.5",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"esm.d.ts","sourceRoot":"","sources":["../../../src/__mocks__/esm.ts"],"names":[],"mappings":"AAEA,wBAAgB,YAAY,WAE3B;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"esm.d.ts","sourceRoot":"","sources":["../../../src/__mocks__/esm.ts"],"names":[],"mappings":"AAEA,wBAAgB,YAAY,WAE3B;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,OAOnE"}
|
|
@@ -30,6 +30,7 @@ function getDirectory() {
|
|
|
30
30
|
return '/test/dir';
|
|
31
31
|
}
|
|
32
32
|
function importModule(filePath, functionName) {
|
|
33
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
33
34
|
const mod = require(path.resolve(filePath));
|
|
34
35
|
if (functionName) {
|
|
35
36
|
return mod[functionName];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"esm.js","sourceRoot":"","sources":["../../../src/__mocks__/esm.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAEA,oCAEC;AAED,
|
|
1
|
+
{"version":3,"file":"esm.js","sourceRoot":"","sources":["../../../src/__mocks__/esm.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAEA,oCAEC;AAED,oCAOC;AAbD,2CAA6B;AAE7B,SAAgB,YAAY;IAC1B,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,SAAgB,YAAY,CAAC,QAAgB,EAAE,YAAqB;IAClE,iEAAiE;IACjE,MAAM,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC5C,IAAI,YAAY,EAAE,CAAC;QACjB,OAAO,GAAG,CAAC,YAAY,CAAC,CAAC;IAC3B,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|