promptfoo 0.72.1 → 0.73.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 +5 -5
- package/dist/package.json +14 -8
- package/dist/src/accounts.d.ts.map +1 -1
- package/dist/src/accounts.js +2 -1
- package/dist/src/accounts.js.map +1 -1
- package/dist/src/assertions/validateAssertions.d.ts +1 -1
- package/dist/src/assertions/validateAssertions.d.ts.map +1 -1
- package/dist/src/assertions/validateAssertions.js +7 -7
- package/dist/src/assertions/validateAssertions.js.map +1 -1
- package/dist/src/assertions.d.ts.map +1 -1
- package/dist/src/assertions.js +2 -1
- package/dist/src/assertions.js.map +1 -1
- package/dist/src/cache.js +2 -2
- package/dist/src/cache.js.map +1 -1
- package/dist/src/commands/eval.d.ts.map +1 -1
- package/dist/src/commands/eval.js +10 -0
- package/dist/src/commands/eval.js.map +1 -1
- package/dist/src/commands/export.d.ts.map +1 -1
- package/dist/src/commands/export.js +15 -14
- package/dist/src/commands/export.js.map +1 -1
- package/dist/src/commands/generate/redteam.d.ts +1 -46
- package/dist/src/commands/generate/redteam.d.ts.map +1 -1
- package/dist/src/commands/generate/redteam.js +70 -26
- package/dist/src/commands/generate/redteam.js.map +1 -1
- package/dist/src/commands/import.d.ts.map +1 -1
- package/dist/src/commands/import.js +2 -1
- package/dist/src/commands/import.js.map +1 -1
- package/dist/src/commands/init.d.ts.map +1 -1
- package/dist/src/commands/init.js +12 -0
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/redteam.d.ts.map +1 -1
- package/dist/src/commands/redteam.js +72 -18
- package/dist/src/commands/redteam.js.map +1 -1
- package/dist/src/commands/view.d.ts.map +1 -1
- package/dist/src/commands/view.js +2 -1
- package/dist/src/commands/view.js.map +1 -1
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/config.js +2 -20
- package/dist/src/config.js.map +1 -1
- package/dist/src/configTypes.d.ts +7 -0
- package/dist/src/configTypes.d.ts.map +1 -0
- package/dist/src/configTypes.js +3 -0
- package/dist/src/configTypes.js.map +1 -0
- package/dist/src/database/index.d.ts +4 -0
- package/dist/src/database/index.d.ts.map +1 -0
- package/dist/src/database/index.js +50 -0
- package/dist/src/database/index.js.map +1 -0
- package/dist/src/{database.d.ts → database/operations.d.ts} +173 -115
- package/dist/src/{database.d.ts.map → database/operations.d.ts.map} +1 -1
- package/dist/src/{database.js → database/operations.js} +1 -25
- package/dist/src/database/operations.js.map +1 -0
- package/dist/src/evaluator.js +2 -2
- package/dist/src/evaluator.js.map +1 -1
- package/dist/src/globalConfig.d.ts +1 -7
- package/dist/src/globalConfig.d.ts.map +1 -1
- package/dist/src/globalConfig.js +3 -3
- package/dist/src/globalConfig.js.map +1 -1
- package/dist/src/matchers.d.ts.map +1 -1
- package/dist/src/matchers.js +6 -2
- package/dist/src/matchers.js.map +1 -1
- package/dist/src/prompts/grading.js +2 -2
- package/dist/src/prompts/processors/python.js +4 -4
- package/dist/src/prompts/processors/python.js.map +1 -1
- package/dist/src/providers/anthropic.d.ts +1 -1
- package/dist/src/providers/anthropic.d.ts.map +1 -1
- package/dist/src/providers/bam.d.ts +1 -1
- package/dist/src/providers/bam.d.ts.map +1 -1
- package/dist/src/providers/bedrock.d.ts +1 -1
- package/dist/src/providers/bedrock.d.ts.map +1 -1
- package/dist/src/providers/cohere.d.ts.map +1 -1
- package/dist/src/providers/cohere.js +4 -1
- package/dist/src/providers/cohere.js.map +1 -1
- package/dist/src/providers/http.d.ts +1 -1
- package/dist/src/providers/http.d.ts.map +1 -1
- package/dist/src/providers/http.js +3 -3
- package/dist/src/providers/http.js.map +1 -1
- package/dist/src/providers/llama.d.ts +1 -1
- package/dist/src/providers/llama.d.ts.map +1 -1
- package/dist/src/providers/localai.d.ts +1 -1
- package/dist/src/providers/localai.d.ts.map +1 -1
- package/dist/src/providers/ollama.d.ts +1 -1
- package/dist/src/providers/ollama.d.ts.map +1 -1
- package/dist/src/providers/openai.d.ts +1 -1
- package/dist/src/providers/openai.d.ts.map +1 -1
- package/dist/src/providers/openai.js +48 -50
- package/dist/src/providers/openai.js.map +1 -1
- package/dist/src/providers/palm.d.ts +1 -1
- package/dist/src/providers/palm.d.ts.map +1 -1
- package/dist/src/providers/pythonCompletion.d.ts.map +1 -1
- package/dist/src/providers/pythonCompletion.js +6 -5
- package/dist/src/providers/pythonCompletion.js.map +1 -1
- package/dist/src/providers/replicate.js +2 -2
- package/dist/src/providers/replicate.js.map +1 -1
- package/dist/src/providers/scriptCompletion.js +3 -3
- package/dist/src/providers/scriptCompletion.js.map +1 -1
- package/dist/src/providers/vertex.d.ts +1 -1
- package/dist/src/providers/vertex.d.ts.map +1 -1
- package/dist/src/providers/vertex.js +23 -10
- package/dist/src/providers/vertex.js.map +1 -1
- package/dist/src/providers/vertexUtil.d.ts +2 -1
- package/dist/src/providers/vertexUtil.d.ts.map +1 -1
- package/dist/src/providers/vertexUtil.js.map +1 -1
- package/dist/src/providers/webhook.d.ts +1 -1
- package/dist/src/providers/webhook.d.ts.map +1 -1
- package/dist/src/providers.d.ts.map +1 -1
- package/dist/src/providers.js +5 -2
- package/dist/src/providers.js.map +1 -1
- package/dist/src/python/pythonUtils.d.ts +4 -0
- package/dist/src/python/pythonUtils.d.ts.map +1 -0
- package/dist/src/python/pythonUtils.js +51 -0
- package/dist/src/python/pythonUtils.js.map +1 -0
- package/dist/src/python/wrapper.d.ts +0 -10
- package/dist/src/python/wrapper.d.ts.map +1 -1
- package/dist/src/python/wrapper.js +2 -49
- package/dist/src/python/wrapper.js.map +1 -1
- package/dist/src/redteam/constants.d.ts +60 -3
- package/dist/src/redteam/constants.d.ts.map +1 -1
- package/dist/src/redteam/constants.js +71 -10
- package/dist/src/redteam/constants.js.map +1 -1
- package/dist/src/redteam/index.d.ts +15 -4
- package/dist/src/redteam/index.d.ts.map +1 -1
- package/dist/src/redteam/index.js +110 -33
- package/dist/src/redteam/index.js.map +1 -1
- package/dist/src/redteam/plugins/base.d.ts +10 -13
- package/dist/src/redteam/plugins/base.d.ts.map +1 -1
- package/dist/src/redteam/plugins/base.js +36 -20
- package/dist/src/redteam/plugins/base.js.map +1 -1
- package/dist/src/redteam/plugins/debugInterface.d.ts +7 -0
- package/dist/src/redteam/plugins/debugInterface.d.ts.map +1 -0
- package/dist/src/redteam/plugins/debugInterface.js +49 -0
- package/dist/src/redteam/plugins/debugInterface.js.map +1 -0
- package/dist/src/redteam/plugins/harmful.d.ts +1 -54
- package/dist/src/redteam/plugins/harmful.d.ts.map +1 -1
- package/dist/src/redteam/plugins/harmful.js +8 -51
- package/dist/src/redteam/plugins/harmful.js.map +1 -1
- package/dist/src/redteam/plugins/pii.d.ts +9 -10
- package/dist/src/redteam/plugins/pii.d.ts.map +1 -1
- package/dist/src/redteam/plugins/pii.js +33 -53
- package/dist/src/redteam/plugins/pii.js.map +1 -1
- package/dist/src/redteam/plugins/rbac.d.ts +7 -0
- package/dist/src/redteam/plugins/rbac.d.ts.map +1 -0
- package/dist/src/redteam/plugins/rbac.js +49 -0
- package/dist/src/redteam/plugins/rbac.js.map +1 -0
- package/dist/src/redteam/plugins/shellInjection.d.ts +7 -0
- package/dist/src/redteam/plugins/shellInjection.d.ts.map +1 -0
- package/dist/src/redteam/plugins/shellInjection.js +54 -0
- package/dist/src/redteam/plugins/shellInjection.js.map +1 -0
- package/dist/src/redteam/plugins/sqlInjection.d.ts +7 -0
- package/dist/src/redteam/plugins/sqlInjection.d.ts.map +1 -0
- package/dist/src/redteam/plugins/sqlInjection.js +44 -0
- package/dist/src/redteam/plugins/sqlInjection.js.map +1 -0
- package/dist/src/redteam/providers/iterative.d.ts.map +1 -1
- package/dist/src/redteam/providers/iterative.js +2 -1
- package/dist/src/redteam/providers/iterative.js.map +1 -1
- package/dist/src/redteam/strategies/injections.d.ts.map +1 -0
- package/dist/src/redteam/{methods → strategies}/injections.js +0 -12
- package/dist/src/redteam/strategies/injections.js.map +1 -0
- package/dist/src/redteam/strategies/iterative.d.ts.map +1 -0
- package/dist/src/redteam/strategies/iterative.js.map +1 -0
- package/dist/src/redteam/types.d.ts +196 -0
- package/dist/src/redteam/types.d.ts.map +1 -0
- package/dist/src/redteam/types.js +124 -0
- package/dist/src/redteam/types.js.map +1 -0
- package/dist/src/redteam/util.d.ts +22 -0
- package/dist/src/redteam/util.d.ts.map +1 -0
- package/dist/src/redteam/util.js +56 -0
- package/dist/src/redteam/util.js.map +1 -0
- package/dist/src/testCases.d.ts +1 -2
- package/dist/src/testCases.d.ts.map +1 -1
- package/dist/src/testCases.js.map +1 -1
- package/dist/src/types/databaseTypes.d.ts +17 -0
- package/dist/src/types/databaseTypes.d.ts.map +1 -0
- package/dist/src/types/databaseTypes.js +3 -0
- package/dist/src/types/databaseTypes.js.map +1 -0
- package/dist/src/{types.d.ts → types/index.d.ts} +4296 -1425
- package/dist/src/{types.d.ts.map → types/index.d.ts.map} +1 -1
- package/dist/src/{types.js → types/index.js} +38 -9
- package/dist/src/types/index.js.map +1 -0
- package/dist/src/util/config.d.ts +3 -0
- package/dist/src/util/config.d.ts.map +1 -0
- package/dist/src/util/config.js +42 -0
- package/dist/src/util/config.js.map +1 -0
- package/dist/src/util/index.d.ts +41 -25
- package/dist/src/util/index.d.ts.map +1 -1
- package/dist/src/util/index.js +81 -119
- package/dist/src/util/index.js.map +1 -1
- package/dist/src/util/json.d.ts +3 -0
- package/dist/src/util/json.d.ts.map +1 -0
- package/dist/src/util/json.js +27 -0
- package/dist/src/util/json.js.map +1 -0
- package/dist/src/web/nextui/404/index.html +1 -1
- package/dist/src/web/nextui/404.html +1 -1
- package/dist/src/web/nextui/_next/static/chunks/155-4e319e68476266ee.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/163-93bab94bc04ae71b.js +6 -0
- package/dist/src/web/nextui/_next/static/chunks/{258-4acb452fe85cff6f.js → 258-b6257e5de9d0e2c7.js} +1 -1
- package/dist/src/web/nextui/_next/static/chunks/281-64d9f1415a301ee5.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/304-cf667fe8f06238b4.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/322-b47b6cc3f5b5fdb8.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/325-0d36870ade5e5263.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/339-79124d204fa988a3.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/378-c135e497df1864cb.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/476-0afb5eb266c57b7f.js +17 -0
- package/dist/src/web/nextui/_next/static/chunks/493-ebd12f00541c4969.js +2 -0
- package/dist/src/web/nextui/_next/static/chunks/497-e280a5610a3d7d42.js +32 -0
- package/dist/src/web/nextui/_next/static/chunks/515-e06d044f12d8a1bd.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/69-5e4d5e60859a86d2.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/737-32d5472455807d7a.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/903-7cc440d9f9e9f95d.js +97 -0
- package/dist/src/web/nextui/_next/static/chunks/905-78cd666f27891ee6.js +28 -0
- package/dist/src/web/nextui/_next/static/chunks/916-b92fea2ab6136411.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/969-6ab6c8f4158da970.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/app/auth/login/page-7247b17e8f179a46.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/app/auth/signup/page-8560afaf494f9882.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/app/datasets/page-6e6ec3c778ccd110.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/app/eval/[id]/not-found-fe10d5df88bc44ef.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/app/eval/[id]/{page-0a39d3450aa09dda.js → page-057e5eb83e0f614b.js} +1 -1
- package/dist/src/web/nextui/_next/static/chunks/app/eval/page-88fa70fc5bf755bc.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/app/layout-15abf0d1049cb47c.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/app/{page-5650318e57510b6c.js → page-122e9cfa52eb218a.js} +1 -1
- package/dist/src/web/nextui/_next/static/chunks/app/progress/page-a62ca531a4bb4149.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/app/prompts/page-10bb2e571670139c.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/app/report/page-a8b83960f08e2bb2.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/app/setup/page-6ea3e180c3116fb2.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/{main-app-929a26b3c8cd3f7a.js → main-app-7a1376166cb8b72e.js} +1 -1
- package/dist/src/web/nextui/_next/static/chunks/{webpack-c9f728822666f852.js → webpack-ee33d95b3e219985.js} +1 -1
- package/dist/src/web/nextui/_next/static/css/13f881e4290b6d59.css +1 -0
- package/dist/src/web/nextui/_next/static/css/87b5e6e04efd27e5.css +1 -0
- package/dist/src/web/nextui/_next/static/css/e17fdafd8599f69b.css +1 -0
- package/dist/src/web/nextui/_next/static/css/eb523daddb89dfc1.css +1 -0
- package/dist/src/web/nextui/auth/login/index.html +1 -1
- package/dist/src/web/nextui/auth/login/index.txt +6 -6
- package/dist/src/web/nextui/auth/signup/index.html +1 -1
- package/dist/src/web/nextui/auth/signup/index.txt +6 -6
- package/dist/src/web/nextui/datasets/index.html +1 -1
- package/dist/src/web/nextui/datasets/index.txt +6 -6
- package/dist/src/web/nextui/eval/index.html +1 -1
- package/dist/src/web/nextui/eval/index.txt +8 -8
- package/dist/src/web/nextui/index.html +1 -1
- package/dist/src/web/nextui/index.txt +5 -5
- package/dist/src/web/nextui/logo-panda.svg +91 -0
- package/dist/src/web/nextui/progress/index.html +1 -1
- package/dist/src/web/nextui/progress/index.txt +6 -6
- package/dist/src/web/nextui/prompts/index.html +1 -1
- package/dist/src/web/nextui/prompts/index.txt +6 -6
- package/dist/src/web/nextui/report/index.html +1 -1
- package/dist/src/web/nextui/report/index.txt +8 -8
- package/dist/src/web/nextui/setup/index.html +1 -1
- package/dist/src/web/nextui/setup/index.txt +7 -7
- package/dist/test/__mocks__/tempCustomModule.d.ts +13 -0
- package/dist/test/__mocks__/tempCustomModule.d.ts.map +1 -0
- package/dist/test/__mocks__/tempCustomModule.js +15 -0
- package/dist/test/__mocks__/tempCustomModule.js.map +1 -0
- package/dist/test/account.test.d.ts +2 -0
- package/dist/test/account.test.d.ts.map +1 -0
- package/dist/test/account.test.js +46 -0
- package/dist/test/account.test.js.map +1 -0
- package/dist/test/assertions/AssertionResult.test.d.ts +2 -0
- package/dist/test/assertions/AssertionResult.test.d.ts.map +1 -0
- package/dist/test/assertions/AssertionResult.test.js +184 -0
- package/dist/test/assertions/AssertionResult.test.js.map +1 -0
- package/dist/test/assertions/validateAssertions.test.d.ts +2 -0
- package/dist/test/assertions/validateAssertions.test.d.ts.map +1 -0
- package/dist/test/assertions/validateAssertions.test.js +40 -0
- package/dist/test/assertions/validateAssertions.test.js.map +1 -0
- package/dist/test/assertions.test.d.ts +2 -0
- package/dist/test/assertions.test.d.ts.map +1 -0
- package/dist/test/assertions.test.js +3162 -0
- package/dist/test/assertions.test.js.map +1 -0
- package/dist/test/cache.test.d.ts +2 -0
- package/dist/test/cache.test.d.ts.map +1 -0
- package/dist/test/cache.test.js +90 -0
- package/dist/test/cache.test.js.map +1 -0
- package/dist/test/checkNodeVersion.test.d.ts +2 -0
- package/dist/test/checkNodeVersion.test.d.ts.map +1 -0
- package/dist/test/checkNodeVersion.test.js +85 -0
- package/dist/test/checkNodeVersion.test.js.map +1 -0
- package/dist/test/commands/eval/filterFailingTests.test.d.ts +2 -0
- package/dist/test/commands/eval/filterFailingTests.test.d.ts.map +1 -0
- package/dist/test/commands/eval/filterFailingTests.test.js +84 -0
- package/dist/test/commands/eval/filterFailingTests.test.js.map +1 -0
- package/dist/test/commands/eval/filterProviders.test.d.ts +2 -0
- package/dist/test/commands/eval/filterProviders.test.d.ts.map +1 -0
- package/dist/test/commands/eval/filterProviders.test.js +50 -0
- package/dist/test/commands/eval/filterProviders.test.js.map +1 -0
- package/dist/test/commands/eval/filterTests.test.d.ts +2 -0
- package/dist/test/commands/eval/filterTests.test.d.ts.map +1 -0
- package/dist/test/commands/eval/filterTests.test.js +51 -0
- package/dist/test/commands/eval/filterTests.test.js.map +1 -0
- package/dist/test/config.test.d.ts +2 -0
- package/dist/test/config.test.d.ts.map +1 -0
- package/dist/test/config.test.js +404 -0
- package/dist/test/config.test.js.map +1 -0
- package/dist/test/csv.test.d.ts +2 -0
- package/dist/test/csv.test.d.ts.map +1 -0
- package/dist/test/csv.test.js +239 -0
- package/dist/test/csv.test.js.map +1 -0
- package/dist/test/evaluator.test.d.ts +2 -0
- package/dist/test/evaluator.test.d.ts.map +1 -0
- package/dist/test/evaluator.test.js +922 -0
- package/dist/test/evaluator.test.js.map +1 -0
- package/dist/test/globalConfig.test.d.ts +2 -0
- package/dist/test/globalConfig.test.d.ts.map +1 -0
- package/dist/test/globalConfig.test.js +91 -0
- package/dist/test/globalConfig.test.js.map +1 -0
- package/dist/test/is-sql-tests/node-sql-parser.test.d.ts +2 -0
- package/dist/test/is-sql-tests/node-sql-parser.test.d.ts.map +1 -0
- package/dist/test/is-sql-tests/node-sql-parser.test.js +179 -0
- package/dist/test/is-sql-tests/node-sql-parser.test.js.map +1 -0
- package/dist/test/matchers.test.d.ts +2 -0
- package/dist/test/matchers.test.d.ts.map +1 -0
- package/dist/test/matchers.test.js +807 -0
- package/dist/test/matchers.test.js.map +1 -0
- package/dist/test/prompts.processors.javascript.test.d.ts +2 -0
- package/dist/test/prompts.processors.javascript.test.d.ts.map +1 -0
- package/dist/test/prompts.processors.javascript.test.js +93 -0
- package/dist/test/prompts.processors.javascript.test.js.map +1 -0
- package/dist/test/prompts.processors.json.test.d.ts +2 -0
- package/dist/test/prompts.processors.json.test.d.ts.map +1 -0
- package/dist/test/prompts.processors.json.test.js +67 -0
- package/dist/test/prompts.processors.json.test.js.map +1 -0
- package/dist/test/prompts.processors.jsonl.test.d.ts +2 -0
- package/dist/test/prompts.processors.jsonl.test.d.ts.map +1 -0
- package/dist/test/prompts.processors.jsonl.test.js +99 -0
- package/dist/test/prompts.processors.jsonl.test.js.map +1 -0
- package/dist/test/prompts.processors.python.test.d.ts +2 -0
- package/dist/test/prompts.processors.python.test.d.ts.map +1 -0
- package/dist/test/prompts.processors.python.test.js +100 -0
- package/dist/test/prompts.processors.python.test.js.map +1 -0
- package/dist/test/prompts.processors.python.utils.test.d.ts +2 -0
- package/dist/test/prompts.processors.python.utils.test.d.ts.map +1 -0
- package/dist/test/prompts.processors.python.utils.test.js +68 -0
- package/dist/test/prompts.processors.python.utils.test.js.map +1 -0
- package/dist/test/prompts.processors.string.test.d.ts +2 -0
- package/dist/test/prompts.processors.string.test.d.ts.map +1 -0
- package/dist/test/prompts.processors.string.test.js +24 -0
- package/dist/test/prompts.processors.string.test.js.map +1 -0
- package/dist/test/prompts.processors.text.test.d.ts +2 -0
- package/dist/test/prompts.processors.text.test.d.ts.map +1 -0
- package/dist/test/prompts.processors.text.test.js +109 -0
- package/dist/test/prompts.processors.text.test.js.map +1 -0
- package/dist/test/prompts.processors.yaml.test.d.ts +2 -0
- package/dist/test/prompts.processors.yaml.test.d.ts.map +1 -0
- package/dist/test/prompts.processors.yaml.test.js +76 -0
- package/dist/test/prompts.processors.yaml.test.js.map +1 -0
- package/dist/test/prompts.test.d.ts +2 -0
- package/dist/test/prompts.test.d.ts.map +1 -0
- package/dist/test/prompts.test.js +562 -0
- package/dist/test/prompts.test.js.map +1 -0
- package/dist/test/prompts.utils.test.d.ts +2 -0
- package/dist/test/prompts.utils.test.d.ts.map +1 -0
- package/dist/test/prompts.utils.test.js +123 -0
- package/dist/test/prompts.utils.test.js.map +1 -0
- package/dist/test/providers.anthropic.test.d.ts +2 -0
- package/dist/test/providers.anthropic.test.d.ts.map +1 -0
- package/dist/test/providers.anthropic.test.js +520 -0
- package/dist/test/providers.anthropic.test.js.map +1 -0
- package/dist/test/providers.azure.test.d.ts +2 -0
- package/dist/test/providers.azure.test.d.ts.map +1 -0
- package/dist/test/providers.azure.test.js +96 -0
- package/dist/test/providers.azure.test.js.map +1 -0
- package/dist/test/providers.bedrock.test.d.ts +2 -0
- package/dist/test/providers.bedrock.test.d.ts.map +1 -0
- package/dist/test/providers.bedrock.test.js +349 -0
- package/dist/test/providers.bedrock.test.js.map +1 -0
- package/dist/test/providers.http.test.d.ts +2 -0
- package/dist/test/providers.http.test.d.ts.map +1 -0
- package/dist/test/providers.http.test.js +130 -0
- package/dist/test/providers.http.test.js.map +1 -0
- package/dist/test/providers.llama.test.d.ts +2 -0
- package/dist/test/providers.llama.test.d.ts.map +1 -0
- package/dist/test/providers.llama.test.js +101 -0
- package/dist/test/providers.llama.test.js.map +1 -0
- package/dist/test/providers.pythonCompletion.test.d.ts +2 -0
- package/dist/test/providers.pythonCompletion.test.d.ts.map +1 -0
- package/dist/test/providers.pythonCompletion.test.js +149 -0
- package/dist/test/providers.pythonCompletion.test.js.map +1 -0
- package/dist/test/providers.test.d.ts +2 -0
- package/dist/test/providers.test.d.ts.map +1 -0
- package/dist/test/providers.test.js +883 -0
- package/dist/test/providers.test.js.map +1 -0
- package/dist/test/providers.vertex.test.d.ts +2 -0
- package/dist/test/providers.vertex.test.d.ts.map +1 -0
- package/dist/test/providers.vertex.test.js +153 -0
- package/dist/test/providers.vertex.test.js.map +1 -0
- package/dist/test/pythonWrapper.test.d.ts +2 -0
- package/dist/test/pythonWrapper.test.d.ts.map +1 -0
- package/dist/test/pythonWrapper.test.js +65 -0
- package/dist/test/pythonWrapper.test.js.map +1 -0
- package/dist/test/redteam/plugins/base.test.d.ts +2 -0
- package/dist/test/redteam/plugins/base.test.d.ts.map +1 -0
- package/dist/test/redteam/plugins/base.test.js +149 -0
- package/dist/test/redteam/plugins/base.test.js.map +1 -0
- package/dist/test/redteam/purpose.test.d.ts +2 -0
- package/dist/test/redteam/purpose.test.d.ts.map +1 -0
- package/dist/test/redteam/purpose.test.js +37 -0
- package/dist/test/redteam/purpose.test.js.map +1 -0
- package/dist/test/redteam/types.test.d.ts +2 -0
- package/dist/test/redteam/types.test.d.ts.map +1 -0
- package/dist/test/redteam/types.test.js +325 -0
- package/dist/test/redteam/types.test.js.map +1 -0
- package/dist/test/redteam/util.test.d.ts +2 -0
- package/dist/test/redteam/util.test.d.ts.map +1 -0
- package/dist/test/redteam/util.test.js +99 -0
- package/dist/test/redteam/util.test.js.map +1 -0
- package/dist/test/telemetry.test.d.ts +2 -0
- package/dist/test/telemetry.test.d.ts.map +1 -0
- package/dist/test/telemetry.test.js +68 -0
- package/dist/test/telemetry.test.js.map +1 -0
- package/dist/test/testCases.test.d.ts +2 -0
- package/dist/test/testCases.test.d.ts.map +1 -0
- package/dist/test/testCases.test.js +362 -0
- package/dist/test/testCases.test.js.map +1 -0
- package/dist/test/updates.test.d.ts +2 -0
- package/dist/test/updates.test.d.ts.map +1 -0
- package/dist/test/updates.test.js +63 -0
- package/dist/test/updates.test.js.map +1 -0
- package/dist/test/util.templates.test.d.ts +2 -0
- package/dist/test/util.templates.test.d.ts.map +1 -0
- package/dist/test/util.templates.test.js +75 -0
- package/dist/test/util.templates.test.js.map +1 -0
- package/dist/test/util.test.d.ts +2 -0
- package/dist/test/util.test.d.ts.map +1 -0
- package/dist/test/util.test.js +661 -0
- package/dist/test/util.test.js.map +1 -0
- package/dist/test/utils.d.ts +6 -0
- package/dist/test/utils.d.ts.map +1 -0
- package/dist/test/utils.js +16 -0
- package/dist/test/utils.js.map +1 -0
- package/package.json +14 -8
- package/dist/src/database.js.map +0 -1
- package/dist/src/redteam/methods/injections.d.ts.map +0 -1
- package/dist/src/redteam/methods/injections.js.map +0 -1
- package/dist/src/redteam/methods/iterative.d.ts.map +0 -1
- package/dist/src/redteam/methods/iterative.js.map +0 -1
- package/dist/src/types.js.map +0 -1
- package/dist/src/web/nextui/_next/static/chunks/163-e65e0f7f442a0c72.js +0 -6
- package/dist/src/web/nextui/_next/static/chunks/180-46db19289d856800.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/304-9d57a2251034b801.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/322-4a0fc9b0508f47e8.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/339-db5bd05e24dde905.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/374-d40afe599198abd3.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/378-e22c8aeb8e031fad.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/448-4da3bf74eae4996a.js +0 -97
- package/dist/src/web/nextui/_next/static/chunks/53-fae6e50ace6c83a1.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/578-8efe57f906f7573c.js +0 -44
- package/dist/src/web/nextui/_next/static/chunks/620-7a5a7bf6e1fe49e5.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/737-538f50dc31cc8c49.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/905-0da344cee75690e7.js +0 -32
- package/dist/src/web/nextui/_next/static/chunks/932-75585b3be8ce494d.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/973-ffe3726c956d08ef.js +0 -2
- package/dist/src/web/nextui/_next/static/chunks/995-803c74b81e7bf6cd.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/app/auth/login/page-2e2c0c725127ea2d.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/app/auth/signup/page-ccdb1f6890601666.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/app/datasets/page-642db4f4a8e8ba40.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/app/eval/[id]/not-found-ce320e6d1e6d1d23.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/app/eval/page-32eaa14d2384c5b0.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/app/layout-4282b1d33566e258.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/app/progress/page-462526776efd6fd6.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/app/prompts/page-0ae78bc0bf7c56bc.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/app/report/page-e4f7851d41eb0f92.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/app/setup/page-6cde750ec428cd75.js +0 -1
- package/dist/src/web/nextui/_next/static/css/35ab7ce8025438b0.css +0 -1
- package/dist/src/web/nextui/_next/static/css/5bd2f45de1f3ba83.css +0 -1
- package/dist/src/web/nextui/_next/static/css/94b771e23fc5d5f5.css +0 -1
- package/dist/src/web/nextui/_next/static/css/dab5d695b3657d59.css +0 -1
- /package/dist/src/redteam/{methods → strategies}/injections.d.ts +0 -0
- /package/dist/src/redteam/{methods → strategies}/iterative.d.ts +0 -0
- /package/dist/src/redteam/{methods → strategies}/iterative.js +0 -0
- /package/dist/src/web/nextui/_next/static/{8E4q0Tmu22G1wENZyXEq0 → L-tpppAe26U-euPv62afH}/_buildManifest.js +0 -0
- /package/dist/src/web/nextui/_next/static/{8E4q0Tmu22G1wENZyXEq0 → L-tpppAe26U-euPv62afH}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EvaluateSummary } from '
|
|
1
|
+
import type { EvaluateSummary } from '../types';
|
|
2
2
|
export declare const prompts: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
3
3
|
name: "prompts";
|
|
4
4
|
schema: undefined;
|
|
@@ -265,10 +265,10 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
|
|
|
265
265
|
}>) & {
|
|
266
266
|
label?: string | undefined;
|
|
267
267
|
}) | (string | {
|
|
268
|
+
id?: string | undefined;
|
|
269
|
+
config?: any;
|
|
268
270
|
prompts?: string[] | undefined;
|
|
269
271
|
delay?: number | undefined;
|
|
270
|
-
config?: any;
|
|
271
|
-
id?: string | undefined;
|
|
272
272
|
label?: string | undefined;
|
|
273
273
|
transform?: string | undefined;
|
|
274
274
|
env?: {
|
|
@@ -350,10 +350,10 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
|
|
|
350
350
|
}>) & {
|
|
351
351
|
label?: string | undefined;
|
|
352
352
|
}) | Record<string, {
|
|
353
|
+
id?: string | undefined;
|
|
354
|
+
config?: any;
|
|
353
355
|
prompts?: string[] | undefined;
|
|
354
356
|
delay?: number | undefined;
|
|
355
|
-
config?: any;
|
|
356
|
-
id?: string | undefined;
|
|
357
357
|
label?: string | undefined;
|
|
358
358
|
transform?: string | undefined;
|
|
359
359
|
env?: {
|
|
@@ -399,8 +399,11 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
|
|
|
399
399
|
postprocess?: string | undefined;
|
|
400
400
|
storeOutputAs?: string | undefined;
|
|
401
401
|
} & {
|
|
402
|
-
rubricPrompt?: string | string[] | undefined;
|
|
403
402
|
provider?: any;
|
|
403
|
+
rubricPrompt?: string | string[] | {
|
|
404
|
+
role: string;
|
|
405
|
+
content: string;
|
|
406
|
+
}[] | undefined;
|
|
404
407
|
factuality?: {
|
|
405
408
|
subset?: number | undefined;
|
|
406
409
|
superset?: number | undefined;
|
|
@@ -412,12 +415,11 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
|
|
|
412
415
|
disableVarExpansion?: boolean | undefined;
|
|
413
416
|
disableConversationVar?: boolean | undefined;
|
|
414
417
|
}) | undefined;
|
|
415
|
-
vars?: Record<string, string | string[] | {}> | undefined;
|
|
416
418
|
provider?: string | {
|
|
419
|
+
id?: string | undefined;
|
|
420
|
+
config?: any;
|
|
417
421
|
prompts?: string[] | undefined;
|
|
418
422
|
delay?: number | undefined;
|
|
419
|
-
config?: any;
|
|
420
|
-
id?: string | undefined;
|
|
421
423
|
label?: string | undefined;
|
|
422
424
|
transform?: string | undefined;
|
|
423
425
|
env?: {
|
|
@@ -519,25 +521,33 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
|
|
|
519
521
|
classification?: Record<string, number> | undefined;
|
|
520
522
|
}>) | undefined;
|
|
521
523
|
} | undefined;
|
|
524
|
+
vars?: Record<string, string | any[] | string[] | {}> | undefined;
|
|
525
|
+
metadata?: Record<string, any> | undefined;
|
|
522
526
|
description?: string | undefined;
|
|
523
527
|
providerOutput?: string | {} | undefined;
|
|
524
528
|
assert?: ({
|
|
525
|
-
type: import("
|
|
526
|
-
value?: import("
|
|
527
|
-
transform?: string | undefined;
|
|
528
|
-
rubricPrompt?: string | string[] | undefined;
|
|
529
|
+
type: import("../types").AssertionType;
|
|
530
|
+
value?: import("../types").AssertionValue | undefined;
|
|
529
531
|
provider?: any;
|
|
532
|
+
transform?: string | undefined;
|
|
533
|
+
rubricPrompt?: string | string[] | {
|
|
534
|
+
role: string;
|
|
535
|
+
content: string;
|
|
536
|
+
}[] | undefined;
|
|
530
537
|
threshold?: number | undefined;
|
|
531
538
|
weight?: number | undefined;
|
|
532
539
|
metric?: string | undefined;
|
|
533
540
|
} | {
|
|
534
541
|
type: "assert-set";
|
|
535
542
|
assert: {
|
|
536
|
-
type: import("
|
|
537
|
-
value?: import("
|
|
538
|
-
transform?: string | undefined;
|
|
539
|
-
rubricPrompt?: string | string[] | undefined;
|
|
543
|
+
type: import("../types").AssertionType;
|
|
544
|
+
value?: import("../types").AssertionValue | undefined;
|
|
540
545
|
provider?: any;
|
|
546
|
+
transform?: string | undefined;
|
|
547
|
+
rubricPrompt?: string | string[] | {
|
|
548
|
+
role: string;
|
|
549
|
+
content: string;
|
|
550
|
+
}[] | undefined;
|
|
541
551
|
threshold?: number | undefined;
|
|
542
552
|
weight?: number | undefined;
|
|
543
553
|
metric?: string | undefined;
|
|
@@ -548,49 +558,6 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
|
|
|
548
558
|
})[] | undefined;
|
|
549
559
|
threshold?: number | undefined;
|
|
550
560
|
})[];
|
|
551
|
-
evaluateOptions: {
|
|
552
|
-
maxConcurrency?: number | undefined;
|
|
553
|
-
repeat?: number | undefined;
|
|
554
|
-
delay?: number | undefined;
|
|
555
|
-
cache?: boolean | undefined;
|
|
556
|
-
interactiveProviders?: boolean | undefined;
|
|
557
|
-
generateSuggestions?: boolean | undefined;
|
|
558
|
-
showProgressBar?: boolean | undefined;
|
|
559
|
-
progressCallback?: ((args_0: number, args_1: number, args_2: number, args_3: import("./types").RunEvalOptions) => void) | undefined;
|
|
560
|
-
eventSource?: string | undefined;
|
|
561
|
-
};
|
|
562
|
-
commandLineOptions: {
|
|
563
|
-
prompts?: string[] | undefined;
|
|
564
|
-
providers?: string[] | undefined;
|
|
565
|
-
output?: string[] | undefined;
|
|
566
|
-
maxConcurrency?: string | undefined;
|
|
567
|
-
repeat?: string | undefined;
|
|
568
|
-
delay?: string | undefined;
|
|
569
|
-
vars?: string | undefined;
|
|
570
|
-
tests?: string | undefined;
|
|
571
|
-
config?: string[] | undefined;
|
|
572
|
-
assertions?: string | undefined;
|
|
573
|
-
modelOutputs?: string | undefined;
|
|
574
|
-
verbose?: boolean | undefined;
|
|
575
|
-
grader?: string | undefined;
|
|
576
|
-
tableCellMaxLength?: string | undefined;
|
|
577
|
-
write?: boolean | undefined;
|
|
578
|
-
cache?: boolean | undefined;
|
|
579
|
-
table?: boolean | undefined;
|
|
580
|
-
share?: boolean | undefined;
|
|
581
|
-
progressBar?: boolean | undefined;
|
|
582
|
-
watch?: boolean | undefined;
|
|
583
|
-
interactiveProviders?: boolean | undefined;
|
|
584
|
-
filterFailing?: string | undefined;
|
|
585
|
-
filterFirstN?: string | undefined;
|
|
586
|
-
filterPattern?: string | undefined;
|
|
587
|
-
filterProviders?: string | undefined;
|
|
588
|
-
var?: Record<string, string> | undefined;
|
|
589
|
-
generateSuggestions?: boolean | undefined;
|
|
590
|
-
promptPrefix?: string | undefined;
|
|
591
|
-
promptSuffix?: string | undefined;
|
|
592
|
-
envFile?: string | undefined;
|
|
593
|
-
};
|
|
594
561
|
env?: {
|
|
595
562
|
ANTHROPIC_API_KEY?: string | undefined;
|
|
596
563
|
BAM_API_KEY?: string | undefined;
|
|
@@ -627,7 +594,7 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
|
|
|
627
594
|
metadata?: Record<string, any> | undefined;
|
|
628
595
|
description?: string | undefined;
|
|
629
596
|
scenarios?: {
|
|
630
|
-
|
|
597
|
+
config: {
|
|
631
598
|
options?: ({
|
|
632
599
|
prefix?: string | undefined;
|
|
633
600
|
suffix?: string | undefined;
|
|
@@ -636,8 +603,11 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
|
|
|
636
603
|
postprocess?: string | undefined;
|
|
637
604
|
storeOutputAs?: string | undefined;
|
|
638
605
|
} & {
|
|
639
|
-
rubricPrompt?: string | string[] | undefined;
|
|
640
606
|
provider?: any;
|
|
607
|
+
rubricPrompt?: string | string[] | {
|
|
608
|
+
role: string;
|
|
609
|
+
content: string;
|
|
610
|
+
}[] | undefined;
|
|
641
611
|
factuality?: {
|
|
642
612
|
subset?: number | undefined;
|
|
643
613
|
superset?: number | undefined;
|
|
@@ -649,12 +619,11 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
|
|
|
649
619
|
disableVarExpansion?: boolean | undefined;
|
|
650
620
|
disableConversationVar?: boolean | undefined;
|
|
651
621
|
}) | undefined;
|
|
652
|
-
vars?: Record<string, string | string[] | {}> | undefined;
|
|
653
622
|
provider?: string | {
|
|
623
|
+
id?: string | undefined;
|
|
624
|
+
config?: any;
|
|
654
625
|
prompts?: string[] | undefined;
|
|
655
626
|
delay?: number | undefined;
|
|
656
|
-
config?: any;
|
|
657
|
-
id?: string | undefined;
|
|
658
627
|
label?: string | undefined;
|
|
659
628
|
transform?: string | undefined;
|
|
660
629
|
env?: {
|
|
@@ -756,25 +725,33 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
|
|
|
756
725
|
classification?: Record<string, number> | undefined;
|
|
757
726
|
}>) | undefined;
|
|
758
727
|
} | undefined;
|
|
728
|
+
vars?: Record<string, string | any[] | string[] | {}> | undefined;
|
|
729
|
+
metadata?: Record<string, any> | undefined;
|
|
759
730
|
description?: string | undefined;
|
|
760
731
|
providerOutput?: string | {} | undefined;
|
|
761
732
|
assert?: ({
|
|
762
|
-
type: import("
|
|
763
|
-
value?: import("
|
|
764
|
-
transform?: string | undefined;
|
|
765
|
-
rubricPrompt?: string | string[] | undefined;
|
|
733
|
+
type: import("../types").AssertionType;
|
|
734
|
+
value?: import("../types").AssertionValue | undefined;
|
|
766
735
|
provider?: any;
|
|
736
|
+
transform?: string | undefined;
|
|
737
|
+
rubricPrompt?: string | string[] | {
|
|
738
|
+
role: string;
|
|
739
|
+
content: string;
|
|
740
|
+
}[] | undefined;
|
|
767
741
|
threshold?: number | undefined;
|
|
768
742
|
weight?: number | undefined;
|
|
769
743
|
metric?: string | undefined;
|
|
770
744
|
} | {
|
|
771
745
|
type: "assert-set";
|
|
772
746
|
assert: {
|
|
773
|
-
type: import("
|
|
774
|
-
value?: import("
|
|
775
|
-
transform?: string | undefined;
|
|
776
|
-
rubricPrompt?: string | string[] | undefined;
|
|
747
|
+
type: import("../types").AssertionType;
|
|
748
|
+
value?: import("../types").AssertionValue | undefined;
|
|
777
749
|
provider?: any;
|
|
750
|
+
transform?: string | undefined;
|
|
751
|
+
rubricPrompt?: string | string[] | {
|
|
752
|
+
role: string;
|
|
753
|
+
content: string;
|
|
754
|
+
}[] | undefined;
|
|
778
755
|
threshold?: number | undefined;
|
|
779
756
|
weight?: number | undefined;
|
|
780
757
|
metric?: string | undefined;
|
|
@@ -785,7 +762,7 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
|
|
|
785
762
|
})[] | undefined;
|
|
786
763
|
threshold?: number | undefined;
|
|
787
764
|
}[];
|
|
788
|
-
|
|
765
|
+
tests: {
|
|
789
766
|
options?: ({
|
|
790
767
|
prefix?: string | undefined;
|
|
791
768
|
suffix?: string | undefined;
|
|
@@ -794,8 +771,11 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
|
|
|
794
771
|
postprocess?: string | undefined;
|
|
795
772
|
storeOutputAs?: string | undefined;
|
|
796
773
|
} & {
|
|
797
|
-
rubricPrompt?: string | string[] | undefined;
|
|
798
774
|
provider?: any;
|
|
775
|
+
rubricPrompt?: string | string[] | {
|
|
776
|
+
role: string;
|
|
777
|
+
content: string;
|
|
778
|
+
}[] | undefined;
|
|
799
779
|
factuality?: {
|
|
800
780
|
subset?: number | undefined;
|
|
801
781
|
superset?: number | undefined;
|
|
@@ -807,12 +787,11 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
|
|
|
807
787
|
disableVarExpansion?: boolean | undefined;
|
|
808
788
|
disableConversationVar?: boolean | undefined;
|
|
809
789
|
}) | undefined;
|
|
810
|
-
vars?: Record<string, string | string[] | {}> | undefined;
|
|
811
790
|
provider?: string | {
|
|
791
|
+
id?: string | undefined;
|
|
792
|
+
config?: any;
|
|
812
793
|
prompts?: string[] | undefined;
|
|
813
794
|
delay?: number | undefined;
|
|
814
|
-
config?: any;
|
|
815
|
-
id?: string | undefined;
|
|
816
795
|
label?: string | undefined;
|
|
817
796
|
transform?: string | undefined;
|
|
818
797
|
env?: {
|
|
@@ -914,25 +893,33 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
|
|
|
914
893
|
classification?: Record<string, number> | undefined;
|
|
915
894
|
}>) | undefined;
|
|
916
895
|
} | undefined;
|
|
896
|
+
vars?: Record<string, string | any[] | string[] | {}> | undefined;
|
|
897
|
+
metadata?: Record<string, any> | undefined;
|
|
917
898
|
description?: string | undefined;
|
|
918
899
|
providerOutput?: string | {} | undefined;
|
|
919
900
|
assert?: ({
|
|
920
|
-
type: import("
|
|
921
|
-
value?: import("
|
|
922
|
-
transform?: string | undefined;
|
|
923
|
-
rubricPrompt?: string | string[] | undefined;
|
|
901
|
+
type: import("../types").AssertionType;
|
|
902
|
+
value?: import("../types").AssertionValue | undefined;
|
|
924
903
|
provider?: any;
|
|
904
|
+
transform?: string | undefined;
|
|
905
|
+
rubricPrompt?: string | string[] | {
|
|
906
|
+
role: string;
|
|
907
|
+
content: string;
|
|
908
|
+
}[] | undefined;
|
|
925
909
|
threshold?: number | undefined;
|
|
926
910
|
weight?: number | undefined;
|
|
927
911
|
metric?: string | undefined;
|
|
928
912
|
} | {
|
|
929
913
|
type: "assert-set";
|
|
930
914
|
assert: {
|
|
931
|
-
type: import("
|
|
932
|
-
value?: import("
|
|
933
|
-
transform?: string | undefined;
|
|
934
|
-
rubricPrompt?: string | string[] | undefined;
|
|
915
|
+
type: import("../types").AssertionType;
|
|
916
|
+
value?: import("../types").AssertionValue | undefined;
|
|
935
917
|
provider?: any;
|
|
918
|
+
transform?: string | undefined;
|
|
919
|
+
rubricPrompt?: string | string[] | {
|
|
920
|
+
role: string;
|
|
921
|
+
content: string;
|
|
922
|
+
}[] | undefined;
|
|
936
923
|
threshold?: number | undefined;
|
|
937
924
|
weight?: number | undefined;
|
|
938
925
|
metric?: string | undefined;
|
|
@@ -954,8 +941,11 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
|
|
|
954
941
|
postprocess?: string | undefined;
|
|
955
942
|
storeOutputAs?: string | undefined;
|
|
956
943
|
} & {
|
|
957
|
-
rubricPrompt?: string | string[] | undefined;
|
|
958
944
|
provider?: any;
|
|
945
|
+
rubricPrompt?: string | string[] | {
|
|
946
|
+
role: string;
|
|
947
|
+
content: string;
|
|
948
|
+
}[] | undefined;
|
|
959
949
|
factuality?: {
|
|
960
950
|
subset?: number | undefined;
|
|
961
951
|
superset?: number | undefined;
|
|
@@ -967,12 +957,11 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
|
|
|
967
957
|
disableVarExpansion?: boolean | undefined;
|
|
968
958
|
disableConversationVar?: boolean | undefined;
|
|
969
959
|
}) | undefined;
|
|
970
|
-
vars?: Record<string, string | string[] | {}> | undefined;
|
|
971
960
|
provider?: string | {
|
|
961
|
+
id?: string | undefined;
|
|
962
|
+
config?: any;
|
|
972
963
|
prompts?: string[] | undefined;
|
|
973
964
|
delay?: number | undefined;
|
|
974
|
-
config?: any;
|
|
975
|
-
id?: string | undefined;
|
|
976
965
|
label?: string | undefined;
|
|
977
966
|
transform?: string | undefined;
|
|
978
967
|
env?: {
|
|
@@ -1074,24 +1063,32 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
|
|
|
1074
1063
|
classification?: Record<string, number> | undefined;
|
|
1075
1064
|
}>) | undefined;
|
|
1076
1065
|
} | undefined;
|
|
1066
|
+
vars?: Record<string, string | any[] | string[] | {}> | undefined;
|
|
1067
|
+
metadata?: Record<string, any> | undefined;
|
|
1077
1068
|
providerOutput?: string | {} | undefined;
|
|
1078
1069
|
assert?: ({
|
|
1079
|
-
type: import("
|
|
1080
|
-
value?: import("
|
|
1081
|
-
transform?: string | undefined;
|
|
1082
|
-
rubricPrompt?: string | string[] | undefined;
|
|
1070
|
+
type: import("../types").AssertionType;
|
|
1071
|
+
value?: import("../types").AssertionValue | undefined;
|
|
1083
1072
|
provider?: any;
|
|
1073
|
+
transform?: string | undefined;
|
|
1074
|
+
rubricPrompt?: string | string[] | {
|
|
1075
|
+
role: string;
|
|
1076
|
+
content: string;
|
|
1077
|
+
}[] | undefined;
|
|
1084
1078
|
threshold?: number | undefined;
|
|
1085
1079
|
weight?: number | undefined;
|
|
1086
1080
|
metric?: string | undefined;
|
|
1087
1081
|
} | {
|
|
1088
1082
|
type: "assert-set";
|
|
1089
1083
|
assert: {
|
|
1090
|
-
type: import("
|
|
1091
|
-
value?: import("
|
|
1092
|
-
transform?: string | undefined;
|
|
1093
|
-
rubricPrompt?: string | string[] | undefined;
|
|
1084
|
+
type: import("../types").AssertionType;
|
|
1085
|
+
value?: import("../types").AssertionValue | undefined;
|
|
1094
1086
|
provider?: any;
|
|
1087
|
+
transform?: string | undefined;
|
|
1088
|
+
rubricPrompt?: string | string[] | {
|
|
1089
|
+
role: string;
|
|
1090
|
+
content: string;
|
|
1091
|
+
}[] | undefined;
|
|
1095
1092
|
threshold?: number | undefined;
|
|
1096
1093
|
weight?: number | undefined;
|
|
1097
1094
|
metric?: string | undefined;
|
|
@@ -1104,14 +1101,68 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
|
|
|
1104
1101
|
} | undefined;
|
|
1105
1102
|
nunjucksFilters?: Record<string, string> | undefined;
|
|
1106
1103
|
derivedMetrics?: {
|
|
1107
|
-
value: string | ((args_0: Record<string, number>, args_1: import("
|
|
1104
|
+
value: string | ((args_0: Record<string, number>, args_1: import("../types").RunEvalOptions, ...args_2: unknown[]) => number);
|
|
1108
1105
|
name: string;
|
|
1109
1106
|
}[] | undefined;
|
|
1107
|
+
redteam?: {
|
|
1108
|
+
plugins: any[];
|
|
1109
|
+
strategies: ({
|
|
1110
|
+
id: string;
|
|
1111
|
+
} | {
|
|
1112
|
+
id: string;
|
|
1113
|
+
})[];
|
|
1114
|
+
provider?: string | undefined;
|
|
1115
|
+
injectVar?: string | undefined;
|
|
1116
|
+
purpose?: string | undefined;
|
|
1117
|
+
} | undefined;
|
|
1110
1118
|
outputPath?: string | string[] | undefined;
|
|
1111
1119
|
sharing?: boolean | {
|
|
1112
1120
|
apiBaseUrl?: string | undefined;
|
|
1113
1121
|
appBaseUrl?: string | undefined;
|
|
1114
1122
|
} | undefined;
|
|
1123
|
+
evaluateOptions?: {
|
|
1124
|
+
repeat?: number | undefined;
|
|
1125
|
+
cache?: boolean | undefined;
|
|
1126
|
+
maxConcurrency?: number | undefined;
|
|
1127
|
+
delay?: number | undefined;
|
|
1128
|
+
interactiveProviders?: boolean | undefined;
|
|
1129
|
+
generateSuggestions?: boolean | undefined;
|
|
1130
|
+
showProgressBar?: boolean | undefined;
|
|
1131
|
+
progressCallback?: ((args_0: number, args_1: number, args_2: number, args_3: import("../types").RunEvalOptions) => void) | undefined;
|
|
1132
|
+
eventSource?: string | undefined;
|
|
1133
|
+
} | undefined;
|
|
1134
|
+
commandLineOptions?: {
|
|
1135
|
+
repeat?: string | undefined;
|
|
1136
|
+
cache?: boolean | undefined;
|
|
1137
|
+
config?: string[] | undefined;
|
|
1138
|
+
envFile?: string | undefined;
|
|
1139
|
+
output?: string[] | undefined;
|
|
1140
|
+
write?: boolean | undefined;
|
|
1141
|
+
prompts?: string[] | undefined;
|
|
1142
|
+
providers?: string[] | undefined;
|
|
1143
|
+
maxConcurrency?: string | undefined;
|
|
1144
|
+
delay?: string | undefined;
|
|
1145
|
+
vars?: string | undefined;
|
|
1146
|
+
tests?: string | undefined;
|
|
1147
|
+
assertions?: string | undefined;
|
|
1148
|
+
modelOutputs?: string | undefined;
|
|
1149
|
+
verbose?: boolean | undefined;
|
|
1150
|
+
grader?: string | undefined;
|
|
1151
|
+
tableCellMaxLength?: string | undefined;
|
|
1152
|
+
table?: boolean | undefined;
|
|
1153
|
+
share?: boolean | undefined;
|
|
1154
|
+
progressBar?: boolean | undefined;
|
|
1155
|
+
watch?: boolean | undefined;
|
|
1156
|
+
interactiveProviders?: boolean | undefined;
|
|
1157
|
+
filterFailing?: string | undefined;
|
|
1158
|
+
filterFirstN?: string | undefined;
|
|
1159
|
+
filterPattern?: string | undefined;
|
|
1160
|
+
filterProviders?: string | undefined;
|
|
1161
|
+
var?: Record<string, string> | undefined;
|
|
1162
|
+
generateSuggestions?: boolean | undefined;
|
|
1163
|
+
promptPrefix?: string | undefined;
|
|
1164
|
+
promptSuffix?: string | undefined;
|
|
1165
|
+
} | undefined;
|
|
1115
1166
|
}>;
|
|
1116
1167
|
driverParam: string;
|
|
1117
1168
|
notNull: true;
|
|
@@ -1202,8 +1253,11 @@ export declare const datasets: import("drizzle-orm/sqlite-core").SQLiteTableWith
|
|
|
1202
1253
|
postprocess?: string | undefined;
|
|
1203
1254
|
storeOutputAs?: string | undefined;
|
|
1204
1255
|
} & {
|
|
1205
|
-
rubricPrompt?: string | string[] | undefined;
|
|
1206
1256
|
provider?: any;
|
|
1257
|
+
rubricPrompt?: string | string[] | {
|
|
1258
|
+
role: string;
|
|
1259
|
+
content: string;
|
|
1260
|
+
}[] | undefined;
|
|
1207
1261
|
factuality?: {
|
|
1208
1262
|
subset?: number | undefined;
|
|
1209
1263
|
superset?: number | undefined;
|
|
@@ -1215,12 +1269,11 @@ export declare const datasets: import("drizzle-orm/sqlite-core").SQLiteTableWith
|
|
|
1215
1269
|
disableVarExpansion?: boolean | undefined;
|
|
1216
1270
|
disableConversationVar?: boolean | undefined;
|
|
1217
1271
|
}) | undefined;
|
|
1218
|
-
vars?: Record<string, string | string[] | {}> | undefined;
|
|
1219
1272
|
provider?: string | {
|
|
1273
|
+
id?: string | undefined;
|
|
1274
|
+
config?: any;
|
|
1220
1275
|
prompts?: string[] | undefined;
|
|
1221
1276
|
delay?: number | undefined;
|
|
1222
|
-
config?: any;
|
|
1223
|
-
id?: string | undefined;
|
|
1224
1277
|
label?: string | undefined;
|
|
1225
1278
|
transform?: string | undefined;
|
|
1226
1279
|
env?: {
|
|
@@ -1322,25 +1375,33 @@ export declare const datasets: import("drizzle-orm/sqlite-core").SQLiteTableWith
|
|
|
1322
1375
|
classification?: Record<string, number> | undefined;
|
|
1323
1376
|
}>) | undefined;
|
|
1324
1377
|
} | undefined;
|
|
1378
|
+
vars?: Record<string, string | any[] | string[] | {}> | undefined;
|
|
1379
|
+
metadata?: Record<string, any> | undefined;
|
|
1325
1380
|
description?: string | undefined;
|
|
1326
1381
|
providerOutput?: string | {} | undefined;
|
|
1327
1382
|
assert?: ({
|
|
1328
|
-
type: import("
|
|
1329
|
-
value?: import("
|
|
1330
|
-
transform?: string | undefined;
|
|
1331
|
-
rubricPrompt?: string | string[] | undefined;
|
|
1383
|
+
type: import("../types").AssertionType;
|
|
1384
|
+
value?: import("../types").AssertionValue | undefined;
|
|
1332
1385
|
provider?: any;
|
|
1386
|
+
transform?: string | undefined;
|
|
1387
|
+
rubricPrompt?: string | string[] | {
|
|
1388
|
+
role: string;
|
|
1389
|
+
content: string;
|
|
1390
|
+
}[] | undefined;
|
|
1333
1391
|
threshold?: number | undefined;
|
|
1334
1392
|
weight?: number | undefined;
|
|
1335
1393
|
metric?: string | undefined;
|
|
1336
1394
|
} | {
|
|
1337
1395
|
type: "assert-set";
|
|
1338
1396
|
assert: {
|
|
1339
|
-
type: import("
|
|
1340
|
-
value?: import("
|
|
1341
|
-
transform?: string | undefined;
|
|
1342
|
-
rubricPrompt?: string | string[] | undefined;
|
|
1397
|
+
type: import("../types").AssertionType;
|
|
1398
|
+
value?: import("../types").AssertionValue | undefined;
|
|
1343
1399
|
provider?: any;
|
|
1400
|
+
transform?: string | undefined;
|
|
1401
|
+
rubricPrompt?: string | string[] | {
|
|
1402
|
+
role: string;
|
|
1403
|
+
content: string;
|
|
1404
|
+
}[] | undefined;
|
|
1344
1405
|
threshold?: number | undefined;
|
|
1345
1406
|
weight?: number | undefined;
|
|
1346
1407
|
metric?: string | undefined;
|
|
@@ -1434,7 +1495,4 @@ export declare const evalsToDatasetsRelations: import("drizzle-orm").Relations<"
|
|
|
1434
1495
|
eval: import("drizzle-orm").One<"evals", true>;
|
|
1435
1496
|
dataset: import("drizzle-orm").One<"datasets", true>;
|
|
1436
1497
|
}>;
|
|
1437
|
-
|
|
1438
|
-
export declare function getDbSignalPath(): string;
|
|
1439
|
-
export declare function getDb(): import("drizzle-orm/better-sqlite3").BetterSQLite3Database<Record<string, unknown>>;
|
|
1440
|
-
//# sourceMappingURL=database.d.ts.map
|
|
1498
|
+
//# sourceMappingURL=operations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../src/database/operations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAiB,MAAM,UAAU,CAAC;AAI/D,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMlB,CAAC;AAEH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAShB,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAe1B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;EAE1B,CAAC;AAIJ,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMnB,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAe3B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;EAE3B,CAAC;AAIJ,eAAO,MAAM,cAAc;;;EAGxB,CAAC;AAEJ,eAAO,MAAM,uBAAuB;;;EASjC,CAAC;AAEJ,eAAO,MAAM,wBAAwB;;;EASlC,CAAC"}
|
|
@@ -1,18 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.evalsToDatasetsRelations = exports.evalsToPromptsRelations = exports.evalsRelations = exports.datasetsRelations = exports.evalsToDatasets = exports.datasets = exports.promptsRelations = exports.evalsToPrompts = exports.evals = exports.prompts = void 0;
|
|
7
|
-
exports.getDbPath = getDbPath;
|
|
8
|
-
exports.getDbSignalPath = getDbSignalPath;
|
|
9
|
-
exports.getDb = getDb;
|
|
10
|
-
const better_sqlite3_1 = __importDefault(require("better-sqlite3"));
|
|
11
4
|
const drizzle_orm_1 = require("drizzle-orm");
|
|
12
|
-
const better_sqlite3_2 = require("drizzle-orm/better-sqlite3");
|
|
13
5
|
const sqlite_core_1 = require("drizzle-orm/sqlite-core");
|
|
14
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
15
|
-
const util_1 = require("./util");
|
|
16
6
|
// ------------ Prompts ------------
|
|
17
7
|
exports.prompts = (0, sqlite_core_1.sqliteTable)('prompts', {
|
|
18
8
|
id: (0, sqlite_core_1.text)('id').primaryKey(),
|
|
@@ -135,18 +125,4 @@ export const llmOutputsRelations = relations(llmOutputs, ({ one }) => ({
|
|
|
135
125
|
}),
|
|
136
126
|
}));
|
|
137
127
|
*/
|
|
138
|
-
|
|
139
|
-
function getDbPath() {
|
|
140
|
-
return node_path_1.default.resolve((0, util_1.getConfigDirectoryPath)(true /* createIfNotExists */), 'promptfoo.db');
|
|
141
|
-
}
|
|
142
|
-
function getDbSignalPath() {
|
|
143
|
-
return node_path_1.default.resolve((0, util_1.getConfigDirectoryPath)(true /* createIfNotExists */), 'evalLastWritten');
|
|
144
|
-
}
|
|
145
|
-
function getDb() {
|
|
146
|
-
if (!dbInstance) {
|
|
147
|
-
const sqlite = new better_sqlite3_1.default(getDbPath());
|
|
148
|
-
dbInstance = (0, better_sqlite3_2.drizzle)(sqlite);
|
|
149
|
-
}
|
|
150
|
-
return dbInstance;
|
|
151
|
-
}
|
|
152
|
-
//# sourceMappingURL=database.js.map
|
|
128
|
+
//# sourceMappingURL=operations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/database/operations.ts"],"names":[],"mappings":";;;AAAA,6CAA6C;AAC7C,yDAAiF;AAGjF,oCAAoC;AAEvB,QAAA,OAAO,GAAG,IAAA,yBAAW,EAAC,SAAS,EAAE;IAC5C,EAAE,EAAE,IAAA,kBAAI,EAAC,IAAI,CAAC,CAAC,UAAU,EAAE;IAC3B,SAAS,EAAE,IAAA,qBAAO,EAAC,YAAY,CAAC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AExD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsCE"}
|
package/dist/src/evaluator.js
CHANGED
|
@@ -46,7 +46,7 @@ const cliState_1 = __importDefault(require("./cliState"));
|
|
|
46
46
|
const esm_1 = require("./esm");
|
|
47
47
|
const logger_1 = __importDefault(require("./logger"));
|
|
48
48
|
const azureopenaiUtil_1 = require("./providers/azureopenaiUtil");
|
|
49
|
-
const
|
|
49
|
+
const pythonUtils_1 = require("./python/pythonUtils");
|
|
50
50
|
const suggestions_1 = require("./suggestions");
|
|
51
51
|
const telemetry_1 = __importDefault(require("./telemetry"));
|
|
52
52
|
const util_1 = require("./util");
|
|
@@ -156,7 +156,7 @@ async function renderPrompt(prompt, vars, nunjucksFilters, provider) {
|
|
|
156
156
|
vars[varName] = javascriptOutput.output;
|
|
157
157
|
break;
|
|
158
158
|
case 'py':
|
|
159
|
-
const pythonScriptOutput = (await (0,
|
|
159
|
+
const pythonScriptOutput = (await (0, pythonUtils_1.runPython)(filePath, 'get_var', [
|
|
160
160
|
varName,
|
|
161
161
|
basePrompt,
|
|
162
162
|
vars,
|