promptfoo 0.103.4 → 0.103.6
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/LICENSE +10 -1
- package/dist/package.json +9 -9
- package/dist/src/app/assets/{index-Br_ykdEV.js → index-CsrcHuZk.js} +203 -203
- package/dist/src/app/assets/{index.es-lNQS-wgf.js → index.es-Ccp6ob2s.js} +1 -1
- package/dist/src/app/assets/{sync-CRhW4wge.js → sync-_oBoT8fc.js} +1 -1
- package/dist/src/app/index.html +1 -1
- package/dist/src/assertions/index.d.ts +1 -1
- package/dist/src/assertions/index.d.ts.map +1 -1
- package/dist/src/assertions/index.js +1 -10
- package/dist/src/assertions/index.js.map +1 -1
- package/dist/src/assertions/utils.d.ts +5 -2
- package/dist/src/assertions/utils.d.ts.map +1 -1
- package/dist/src/commands/auth.d.ts +1 -0
- package/dist/src/commands/auth.d.ts.map +1 -1
- package/dist/src/commands/auth.js +7 -3
- package/dist/src/commands/auth.js.map +1 -1
- package/dist/src/database/tables.d.ts +45 -12
- package/dist/src/database/tables.d.ts.map +1 -1
- package/dist/src/fetch.d.ts.map +1 -1
- package/dist/src/fetch.js +20 -3
- package/dist/src/fetch.js.map +1 -1
- package/dist/src/globalConfig/cloud.d.ts +1 -0
- package/dist/src/globalConfig/cloud.d.ts.map +1 -1
- package/dist/src/globalConfig/cloud.js +4 -4
- package/dist/src/globalConfig/cloud.js.map +1 -1
- package/dist/src/index.d.ts +19 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +13 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/providers/bedrock.d.ts.map +1 -1
- package/dist/src/providers/bedrock.js +28 -9
- package/dist/src/providers/bedrock.js.map +1 -1
- package/dist/src/providers/browser.js +1 -1
- package/dist/src/providers/browser.js.map +1 -1
- package/dist/src/providers/defaults.d.ts +1 -0
- package/dist/src/providers/defaults.d.ts.map +1 -1
- package/dist/src/providers/defaults.js +11 -0
- package/dist/src/providers/defaults.js.map +1 -1
- package/dist/src/providers/http.d.ts.map +1 -1
- package/dist/src/providers/http.js +39 -63
- package/dist/src/providers/http.js.map +1 -1
- package/dist/src/redteam/commands/run.d.ts +2 -0
- package/dist/src/redteam/commands/run.d.ts.map +1 -1
- package/dist/src/redteam/commands/run.js +41 -31
- package/dist/src/redteam/commands/run.js.map +1 -1
- package/dist/src/redteam/constants.d.ts +2 -2
- package/dist/src/redteam/constants.d.ts.map +1 -1
- package/dist/src/redteam/constants.js +3 -6
- package/dist/src/redteam/constants.js.map +1 -1
- package/dist/src/redteam/plugins/base.d.ts.map +1 -1
- package/dist/src/redteam/plugins/base.js +3 -0
- package/dist/src/redteam/plugins/base.js.map +1 -1
- package/dist/src/redteam/providers/crescendo/index.d.ts +1 -0
- package/dist/src/redteam/providers/crescendo/index.d.ts.map +1 -1
- package/dist/src/redteam/providers/crescendo/index.js +58 -3
- package/dist/src/redteam/providers/crescendo/index.js.map +1 -1
- package/dist/src/redteam/providers/iterative.js +4 -4
- package/dist/src/redteam/providers/iterative.js.map +1 -1
- package/dist/src/redteam/providers/iterativeTree.d.ts.map +1 -1
- package/dist/src/redteam/providers/iterativeTree.js +5 -4
- package/dist/src/redteam/providers/iterativeTree.js.map +1 -1
- package/dist/src/redteam/shared.d.ts.map +1 -1
- package/dist/src/redteam/shared.js +4 -1
- package/dist/src/redteam/shared.js.map +1 -1
- package/dist/src/types/env.d.ts +2 -0
- package/dist/src/types/env.d.ts.map +1 -1
- package/dist/src/types/index.d.ts +1215 -342
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/src/util/convertEvalResultsToTable.d.ts.map +1 -1
- package/dist/src/util/convertEvalResultsToTable.js +14 -0
- package/dist/src/util/convertEvalResultsToTable.js.map +1 -1
- package/dist/src/util/index.d.ts +10 -4
- package/dist/src/util/index.d.ts.map +1 -1
- package/dist/src/validators/providers.d.ts +71 -2
- package/dist/src/validators/providers.d.ts.map +1 -1
- package/dist/src/validators/providers.js +3 -0
- package/dist/src/validators/providers.js.map +1 -1
- package/dist/src/validators/redteam.d.ts +24 -0
- package/dist/src/validators/redteam.d.ts.map +1 -1
- package/dist/test/assertions/index.test.js +0 -30
- package/dist/test/assertions/index.test.js.map +1 -1
- package/dist/test/assertions/python.test.js +35 -0
- package/dist/test/assertions/python.test.js.map +1 -1
- package/dist/test/factories/evalFactory.d.ts +35 -8
- package/dist/test/factories/evalFactory.d.ts.map +1 -1
- package/dist/test/fetch.test.js +147 -19
- package/dist/test/fetch.test.js.map +1 -1
- package/dist/test/index.test.js +2 -0
- package/dist/test/index.test.js.map +1 -1
- package/dist/test/providers/bedrock.test.js +38 -0
- package/dist/test/providers/bedrock.test.js.map +1 -1
- package/dist/test/providers/defaults.test.d.ts +2 -0
- package/dist/test/providers/defaults.test.d.ts.map +1 -0
- package/dist/test/providers/defaults.test.js +77 -0
- package/dist/test/providers/defaults.test.js.map +1 -0
- package/dist/test/providers/http.test.js +65 -9
- package/dist/test/providers/http.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -9
|
@@ -226,6 +226,7 @@ export declare const evalsTable: import("drizzle-orm/sqlite-core").SQLiteTableWi
|
|
|
226
226
|
WATSONX_AI_APIKEY?: string | undefined;
|
|
227
227
|
WATSONX_AI_PROJECT_ID?: string | undefined;
|
|
228
228
|
WATSONX_AI_BEARER_TOKEN?: string | undefined;
|
|
229
|
+
WATSONX_AI_AUTH_TYPE?: string | undefined;
|
|
229
230
|
AZURE_CLIENT_SECRET?: string | undefined;
|
|
230
231
|
AZURE_CLIENT_ID?: string | undefined;
|
|
231
232
|
AZURE_TENANT_ID?: string | undefined;
|
|
@@ -266,6 +267,8 @@ export declare const evalsTable: import("drizzle-orm/sqlite-core").SQLiteTableWi
|
|
|
266
267
|
VERTEX_PROJECT_ID?: string | undefined;
|
|
267
268
|
VERTEX_PUBLISHER?: string | undefined;
|
|
268
269
|
VERTEX_REGION?: string | undefined;
|
|
270
|
+
PROMPTFOO_CA_CERT_PATH?: string | undefined;
|
|
271
|
+
PROMPTFOO_INSECURE_SSL?: string | undefined;
|
|
269
272
|
} | undefined;
|
|
270
273
|
metadata?: Record<string, any> | undefined;
|
|
271
274
|
description?: string | undefined;
|
|
@@ -310,6 +313,7 @@ export declare const evalsTable: import("drizzle-orm/sqlite-core").SQLiteTableWi
|
|
|
310
313
|
WATSONX_AI_APIKEY?: string | undefined;
|
|
311
314
|
WATSONX_AI_PROJECT_ID?: string | undefined;
|
|
312
315
|
WATSONX_AI_BEARER_TOKEN?: string | undefined;
|
|
316
|
+
WATSONX_AI_AUTH_TYPE?: string | undefined;
|
|
313
317
|
AZURE_CLIENT_SECRET?: string | undefined;
|
|
314
318
|
AZURE_CLIENT_ID?: string | undefined;
|
|
315
319
|
AZURE_TENANT_ID?: string | undefined;
|
|
@@ -350,6 +354,8 @@ export declare const evalsTable: import("drizzle-orm/sqlite-core").SQLiteTableWi
|
|
|
350
354
|
VERTEX_PROJECT_ID?: string | undefined;
|
|
351
355
|
VERTEX_PUBLISHER?: string | undefined;
|
|
352
356
|
VERTEX_REGION?: string | undefined;
|
|
357
|
+
PROMPTFOO_CA_CERT_PATH?: string | undefined;
|
|
358
|
+
PROMPTFOO_INSECURE_SSL?: string | undefined;
|
|
353
359
|
} | undefined;
|
|
354
360
|
} | (((args_0: string, args_1: {
|
|
355
361
|
vars: Record<string, string | {}>;
|
|
@@ -392,6 +398,7 @@ export declare const evalsTable: import("drizzle-orm/sqlite-core").SQLiteTableWi
|
|
|
392
398
|
WATSONX_AI_APIKEY?: string | undefined;
|
|
393
399
|
WATSONX_AI_PROJECT_ID?: string | undefined;
|
|
394
400
|
WATSONX_AI_BEARER_TOKEN?: string | undefined;
|
|
401
|
+
WATSONX_AI_AUTH_TYPE?: string | undefined;
|
|
395
402
|
AZURE_CLIENT_SECRET?: string | undefined;
|
|
396
403
|
AZURE_CLIENT_ID?: string | undefined;
|
|
397
404
|
AZURE_TENANT_ID?: string | undefined;
|
|
@@ -432,6 +439,8 @@ export declare const evalsTable: import("drizzle-orm/sqlite-core").SQLiteTableWi
|
|
|
432
439
|
VERTEX_PROJECT_ID?: string | undefined;
|
|
433
440
|
VERTEX_PUBLISHER?: string | undefined;
|
|
434
441
|
VERTEX_REGION?: string | undefined;
|
|
442
|
+
PROMPTFOO_CA_CERT_PATH?: string | undefined;
|
|
443
|
+
PROMPTFOO_INSECURE_SSL?: string | undefined;
|
|
435
444
|
} | undefined;
|
|
436
445
|
}>)[] | undefined;
|
|
437
446
|
tests?: string | (string | {
|
|
@@ -481,6 +490,7 @@ export declare const evalsTable: import("drizzle-orm/sqlite-core").SQLiteTableWi
|
|
|
481
490
|
WATSONX_AI_APIKEY?: string | undefined;
|
|
482
491
|
WATSONX_AI_PROJECT_ID?: string | undefined;
|
|
483
492
|
WATSONX_AI_BEARER_TOKEN?: string | undefined;
|
|
493
|
+
WATSONX_AI_AUTH_TYPE?: string | undefined;
|
|
484
494
|
AZURE_CLIENT_SECRET?: string | undefined;
|
|
485
495
|
AZURE_CLIENT_ID?: string | undefined;
|
|
486
496
|
AZURE_TENANT_ID?: string | undefined;
|
|
@@ -521,6 +531,8 @@ export declare const evalsTable: import("drizzle-orm/sqlite-core").SQLiteTableWi
|
|
|
521
531
|
VERTEX_PROJECT_ID?: string | undefined;
|
|
522
532
|
VERTEX_PUBLISHER?: string | undefined;
|
|
523
533
|
VERTEX_REGION?: string | undefined;
|
|
534
|
+
PROMPTFOO_CA_CERT_PATH?: string | undefined;
|
|
535
|
+
PROMPTFOO_INSECURE_SSL?: string | undefined;
|
|
524
536
|
} | undefined;
|
|
525
537
|
} | {
|
|
526
538
|
callApi: import("../types").CallApiFunction;
|
|
@@ -539,7 +551,7 @@ export declare const evalsTable: import("drizzle-orm/sqlite-core").SQLiteTableWi
|
|
|
539
551
|
description?: string | undefined;
|
|
540
552
|
providerOutput?: string | {} | undefined;
|
|
541
553
|
assert?: ({
|
|
542
|
-
type: "
|
|
554
|
+
type: "moderation" | `promptfoo:redteam:${string}` | "cost" | "factuality" | "answer-relevance" | "bleu" | "classifier" | "contains-all" | "contains-any" | "contains-json" | "contains-sql" | "contains-xml" | "contains" | "context-faithfulness" | "context-recall" | "context-relevance" | "equals" | "g-eval" | "icontains-all" | "icontains-any" | "icontains" | "is-json" | "is-refusal" | "is-sql" | "is-valid-openai-function-call" | "is-valid-openai-tools-call" | "is-xml" | "javascript" | "latency" | "levenshtein" | "llm-rubric" | "model-graded-closedqa" | "model-graded-factuality" | "perplexity-score" | "perplexity" | "python" | "regex" | "rouge-n" | "similar" | "starts-with" | "webhook" | "not-moderation" | "not-cost" | "not-factuality" | "not-answer-relevance" | "not-bleu" | "not-classifier" | "not-contains-all" | "not-contains-any" | "not-contains-json" | "not-contains-sql" | "not-contains-xml" | "not-contains" | "not-context-faithfulness" | "not-context-recall" | "not-context-relevance" | "not-equals" | "not-g-eval" | "not-icontains-all" | "not-icontains-any" | "not-icontains" | "not-is-json" | "not-is-refusal" | "not-is-sql" | "not-is-valid-openai-function-call" | "not-is-valid-openai-tools-call" | "not-is-xml" | "not-javascript" | "not-latency" | "not-levenshtein" | "not-llm-rubric" | "not-model-graded-closedqa" | "not-model-graded-factuality" | "not-perplexity-score" | "not-perplexity" | "not-python" | "not-regex" | "not-rouge-n" | "not-similar" | "not-starts-with" | "not-webhook" | "select-best" | "human";
|
|
543
555
|
value?: import("../types").AssertionValue | undefined;
|
|
544
556
|
config?: Record<string, any> | undefined;
|
|
545
557
|
provider?: any;
|
|
@@ -554,7 +566,7 @@ export declare const evalsTable: import("drizzle-orm/sqlite-core").SQLiteTableWi
|
|
|
554
566
|
} | {
|
|
555
567
|
type: "assert-set";
|
|
556
568
|
assert: {
|
|
557
|
-
type: "
|
|
569
|
+
type: "moderation" | `promptfoo:redteam:${string}` | "cost" | "factuality" | "answer-relevance" | "bleu" | "classifier" | "contains-all" | "contains-any" | "contains-json" | "contains-sql" | "contains-xml" | "contains" | "context-faithfulness" | "context-recall" | "context-relevance" | "equals" | "g-eval" | "icontains-all" | "icontains-any" | "icontains" | "is-json" | "is-refusal" | "is-sql" | "is-valid-openai-function-call" | "is-valid-openai-tools-call" | "is-xml" | "javascript" | "latency" | "levenshtein" | "llm-rubric" | "model-graded-closedqa" | "model-graded-factuality" | "perplexity-score" | "perplexity" | "python" | "regex" | "rouge-n" | "similar" | "starts-with" | "webhook" | "not-moderation" | "not-cost" | "not-factuality" | "not-answer-relevance" | "not-bleu" | "not-classifier" | "not-contains-all" | "not-contains-any" | "not-contains-json" | "not-contains-sql" | "not-contains-xml" | "not-contains" | "not-context-faithfulness" | "not-context-recall" | "not-context-relevance" | "not-equals" | "not-g-eval" | "not-icontains-all" | "not-icontains-any" | "not-icontains" | "not-is-json" | "not-is-refusal" | "not-is-sql" | "not-is-valid-openai-function-call" | "not-is-valid-openai-tools-call" | "not-is-xml" | "not-javascript" | "not-latency" | "not-levenshtein" | "not-llm-rubric" | "not-model-graded-closedqa" | "not-model-graded-factuality" | "not-perplexity-score" | "not-perplexity" | "not-python" | "not-regex" | "not-rouge-n" | "not-similar" | "not-starts-with" | "not-webhook" | "select-best" | "human";
|
|
558
570
|
value?: import("../types").AssertionValue | undefined;
|
|
559
571
|
config?: Record<string, any> | undefined;
|
|
560
572
|
provider?: any;
|
|
@@ -624,6 +636,7 @@ export declare const evalsTable: import("drizzle-orm/sqlite-core").SQLiteTableWi
|
|
|
624
636
|
WATSONX_AI_APIKEY?: string | undefined;
|
|
625
637
|
WATSONX_AI_PROJECT_ID?: string | undefined;
|
|
626
638
|
WATSONX_AI_BEARER_TOKEN?: string | undefined;
|
|
639
|
+
WATSONX_AI_AUTH_TYPE?: string | undefined;
|
|
627
640
|
AZURE_CLIENT_SECRET?: string | undefined;
|
|
628
641
|
AZURE_CLIENT_ID?: string | undefined;
|
|
629
642
|
AZURE_TENANT_ID?: string | undefined;
|
|
@@ -664,6 +677,8 @@ export declare const evalsTable: import("drizzle-orm/sqlite-core").SQLiteTableWi
|
|
|
664
677
|
VERTEX_PROJECT_ID?: string | undefined;
|
|
665
678
|
VERTEX_PUBLISHER?: string | undefined;
|
|
666
679
|
VERTEX_REGION?: string | undefined;
|
|
680
|
+
PROMPTFOO_CA_CERT_PATH?: string | undefined;
|
|
681
|
+
PROMPTFOO_INSECURE_SSL?: string | undefined;
|
|
667
682
|
} | undefined;
|
|
668
683
|
} | {
|
|
669
684
|
callApi: import("../types").CallApiFunction;
|
|
@@ -682,7 +697,7 @@ export declare const evalsTable: import("drizzle-orm/sqlite-core").SQLiteTableWi
|
|
|
682
697
|
description?: string | undefined;
|
|
683
698
|
providerOutput?: string | {} | undefined;
|
|
684
699
|
assert?: ({
|
|
685
|
-
type: "
|
|
700
|
+
type: "moderation" | `promptfoo:redteam:${string}` | "cost" | "factuality" | "answer-relevance" | "bleu" | "classifier" | "contains-all" | "contains-any" | "contains-json" | "contains-sql" | "contains-xml" | "contains" | "context-faithfulness" | "context-recall" | "context-relevance" | "equals" | "g-eval" | "icontains-all" | "icontains-any" | "icontains" | "is-json" | "is-refusal" | "is-sql" | "is-valid-openai-function-call" | "is-valid-openai-tools-call" | "is-xml" | "javascript" | "latency" | "levenshtein" | "llm-rubric" | "model-graded-closedqa" | "model-graded-factuality" | "perplexity-score" | "perplexity" | "python" | "regex" | "rouge-n" | "similar" | "starts-with" | "webhook" | "not-moderation" | "not-cost" | "not-factuality" | "not-answer-relevance" | "not-bleu" | "not-classifier" | "not-contains-all" | "not-contains-any" | "not-contains-json" | "not-contains-sql" | "not-contains-xml" | "not-contains" | "not-context-faithfulness" | "not-context-recall" | "not-context-relevance" | "not-equals" | "not-g-eval" | "not-icontains-all" | "not-icontains-any" | "not-icontains" | "not-is-json" | "not-is-refusal" | "not-is-sql" | "not-is-valid-openai-function-call" | "not-is-valid-openai-tools-call" | "not-is-xml" | "not-javascript" | "not-latency" | "not-levenshtein" | "not-llm-rubric" | "not-model-graded-closedqa" | "not-model-graded-factuality" | "not-perplexity-score" | "not-perplexity" | "not-python" | "not-regex" | "not-rouge-n" | "not-similar" | "not-starts-with" | "not-webhook" | "select-best" | "human";
|
|
686
701
|
value?: import("../types").AssertionValue | undefined;
|
|
687
702
|
config?: Record<string, any> | undefined;
|
|
688
703
|
provider?: any;
|
|
@@ -697,7 +712,7 @@ export declare const evalsTable: import("drizzle-orm/sqlite-core").SQLiteTableWi
|
|
|
697
712
|
} | {
|
|
698
713
|
type: "assert-set";
|
|
699
714
|
assert: {
|
|
700
|
-
type: "
|
|
715
|
+
type: "moderation" | `promptfoo:redteam:${string}` | "cost" | "factuality" | "answer-relevance" | "bleu" | "classifier" | "contains-all" | "contains-any" | "contains-json" | "contains-sql" | "contains-xml" | "contains" | "context-faithfulness" | "context-recall" | "context-relevance" | "equals" | "g-eval" | "icontains-all" | "icontains-any" | "icontains" | "is-json" | "is-refusal" | "is-sql" | "is-valid-openai-function-call" | "is-valid-openai-tools-call" | "is-xml" | "javascript" | "latency" | "levenshtein" | "llm-rubric" | "model-graded-closedqa" | "model-graded-factuality" | "perplexity-score" | "perplexity" | "python" | "regex" | "rouge-n" | "similar" | "starts-with" | "webhook" | "not-moderation" | "not-cost" | "not-factuality" | "not-answer-relevance" | "not-bleu" | "not-classifier" | "not-contains-all" | "not-contains-any" | "not-contains-json" | "not-contains-sql" | "not-contains-xml" | "not-contains" | "not-context-faithfulness" | "not-context-recall" | "not-context-relevance" | "not-equals" | "not-g-eval" | "not-icontains-all" | "not-icontains-any" | "not-icontains" | "not-is-json" | "not-is-refusal" | "not-is-sql" | "not-is-valid-openai-function-call" | "not-is-valid-openai-tools-call" | "not-is-xml" | "not-javascript" | "not-latency" | "not-levenshtein" | "not-llm-rubric" | "not-model-graded-closedqa" | "not-model-graded-factuality" | "not-perplexity-score" | "not-perplexity" | "not-python" | "not-regex" | "not-rouge-n" | "not-similar" | "not-starts-with" | "not-webhook" | "select-best" | "human";
|
|
701
716
|
value?: import("../types").AssertionValue | undefined;
|
|
702
717
|
config?: Record<string, any> | undefined;
|
|
703
718
|
provider?: any;
|
|
@@ -764,6 +779,7 @@ export declare const evalsTable: import("drizzle-orm/sqlite-core").SQLiteTableWi
|
|
|
764
779
|
WATSONX_AI_APIKEY?: string | undefined;
|
|
765
780
|
WATSONX_AI_PROJECT_ID?: string | undefined;
|
|
766
781
|
WATSONX_AI_BEARER_TOKEN?: string | undefined;
|
|
782
|
+
WATSONX_AI_AUTH_TYPE?: string | undefined;
|
|
767
783
|
AZURE_CLIENT_SECRET?: string | undefined;
|
|
768
784
|
AZURE_CLIENT_ID?: string | undefined;
|
|
769
785
|
AZURE_TENANT_ID?: string | undefined;
|
|
@@ -804,6 +820,8 @@ export declare const evalsTable: import("drizzle-orm/sqlite-core").SQLiteTableWi
|
|
|
804
820
|
VERTEX_PROJECT_ID?: string | undefined;
|
|
805
821
|
VERTEX_PUBLISHER?: string | undefined;
|
|
806
822
|
VERTEX_REGION?: string | undefined;
|
|
823
|
+
PROMPTFOO_CA_CERT_PATH?: string | undefined;
|
|
824
|
+
PROMPTFOO_INSECURE_SSL?: string | undefined;
|
|
807
825
|
} | undefined;
|
|
808
826
|
} | {
|
|
809
827
|
callApi: import("../types").CallApiFunction;
|
|
@@ -822,7 +840,7 @@ export declare const evalsTable: import("drizzle-orm/sqlite-core").SQLiteTableWi
|
|
|
822
840
|
description?: string | undefined;
|
|
823
841
|
providerOutput?: string | {} | undefined;
|
|
824
842
|
assert?: ({
|
|
825
|
-
type: "
|
|
843
|
+
type: "moderation" | `promptfoo:redteam:${string}` | "cost" | "factuality" | "answer-relevance" | "bleu" | "classifier" | "contains-all" | "contains-any" | "contains-json" | "contains-sql" | "contains-xml" | "contains" | "context-faithfulness" | "context-recall" | "context-relevance" | "equals" | "g-eval" | "icontains-all" | "icontains-any" | "icontains" | "is-json" | "is-refusal" | "is-sql" | "is-valid-openai-function-call" | "is-valid-openai-tools-call" | "is-xml" | "javascript" | "latency" | "levenshtein" | "llm-rubric" | "model-graded-closedqa" | "model-graded-factuality" | "perplexity-score" | "perplexity" | "python" | "regex" | "rouge-n" | "similar" | "starts-with" | "webhook" | "not-moderation" | "not-cost" | "not-factuality" | "not-answer-relevance" | "not-bleu" | "not-classifier" | "not-contains-all" | "not-contains-any" | "not-contains-json" | "not-contains-sql" | "not-contains-xml" | "not-contains" | "not-context-faithfulness" | "not-context-recall" | "not-context-relevance" | "not-equals" | "not-g-eval" | "not-icontains-all" | "not-icontains-any" | "not-icontains" | "not-is-json" | "not-is-refusal" | "not-is-sql" | "not-is-valid-openai-function-call" | "not-is-valid-openai-tools-call" | "not-is-xml" | "not-javascript" | "not-latency" | "not-levenshtein" | "not-llm-rubric" | "not-model-graded-closedqa" | "not-model-graded-factuality" | "not-perplexity-score" | "not-perplexity" | "not-python" | "not-regex" | "not-rouge-n" | "not-similar" | "not-starts-with" | "not-webhook" | "select-best" | "human";
|
|
826
844
|
value?: import("../types").AssertionValue | undefined;
|
|
827
845
|
config?: Record<string, any> | undefined;
|
|
828
846
|
provider?: any;
|
|
@@ -837,7 +855,7 @@ export declare const evalsTable: import("drizzle-orm/sqlite-core").SQLiteTableWi
|
|
|
837
855
|
} | {
|
|
838
856
|
type: "assert-set";
|
|
839
857
|
assert: {
|
|
840
|
-
type: "
|
|
858
|
+
type: "moderation" | `promptfoo:redteam:${string}` | "cost" | "factuality" | "answer-relevance" | "bleu" | "classifier" | "contains-all" | "contains-any" | "contains-json" | "contains-sql" | "contains-xml" | "contains" | "context-faithfulness" | "context-recall" | "context-relevance" | "equals" | "g-eval" | "icontains-all" | "icontains-any" | "icontains" | "is-json" | "is-refusal" | "is-sql" | "is-valid-openai-function-call" | "is-valid-openai-tools-call" | "is-xml" | "javascript" | "latency" | "levenshtein" | "llm-rubric" | "model-graded-closedqa" | "model-graded-factuality" | "perplexity-score" | "perplexity" | "python" | "regex" | "rouge-n" | "similar" | "starts-with" | "webhook" | "not-moderation" | "not-cost" | "not-factuality" | "not-answer-relevance" | "not-bleu" | "not-classifier" | "not-contains-all" | "not-contains-any" | "not-contains-json" | "not-contains-sql" | "not-contains-xml" | "not-contains" | "not-context-faithfulness" | "not-context-recall" | "not-context-relevance" | "not-equals" | "not-g-eval" | "not-icontains-all" | "not-icontains-any" | "not-icontains" | "not-is-json" | "not-is-refusal" | "not-is-sql" | "not-is-valid-openai-function-call" | "not-is-valid-openai-tools-call" | "not-is-xml" | "not-javascript" | "not-latency" | "not-levenshtein" | "not-llm-rubric" | "not-model-graded-closedqa" | "not-model-graded-factuality" | "not-perplexity-score" | "not-perplexity" | "not-python" | "not-regex" | "not-rouge-n" | "not-similar" | "not-starts-with" | "not-webhook" | "select-best" | "human";
|
|
841
859
|
value?: import("../types").AssertionValue | undefined;
|
|
842
860
|
config?: Record<string, any> | undefined;
|
|
843
861
|
provider?: any;
|
|
@@ -906,6 +924,7 @@ export declare const evalsTable: import("drizzle-orm/sqlite-core").SQLiteTableWi
|
|
|
906
924
|
WATSONX_AI_APIKEY?: string | undefined;
|
|
907
925
|
WATSONX_AI_PROJECT_ID?: string | undefined;
|
|
908
926
|
WATSONX_AI_BEARER_TOKEN?: string | undefined;
|
|
927
|
+
WATSONX_AI_AUTH_TYPE?: string | undefined;
|
|
909
928
|
AZURE_CLIENT_SECRET?: string | undefined;
|
|
910
929
|
AZURE_CLIENT_ID?: string | undefined;
|
|
911
930
|
AZURE_TENANT_ID?: string | undefined;
|
|
@@ -946,6 +965,8 @@ export declare const evalsTable: import("drizzle-orm/sqlite-core").SQLiteTableWi
|
|
|
946
965
|
VERTEX_PROJECT_ID?: string | undefined;
|
|
947
966
|
VERTEX_PUBLISHER?: string | undefined;
|
|
948
967
|
VERTEX_REGION?: string | undefined;
|
|
968
|
+
PROMPTFOO_CA_CERT_PATH?: string | undefined;
|
|
969
|
+
PROMPTFOO_INSECURE_SSL?: string | undefined;
|
|
949
970
|
} | undefined;
|
|
950
971
|
} | {
|
|
951
972
|
callApi: import("../types").CallApiFunction;
|
|
@@ -963,7 +984,7 @@ export declare const evalsTable: import("drizzle-orm/sqlite-core").SQLiteTableWi
|
|
|
963
984
|
}) | undefined;
|
|
964
985
|
providerOutput?: string | {} | undefined;
|
|
965
986
|
assert?: ({
|
|
966
|
-
type: "
|
|
987
|
+
type: "moderation" | `promptfoo:redteam:${string}` | "cost" | "factuality" | "answer-relevance" | "bleu" | "classifier" | "contains-all" | "contains-any" | "contains-json" | "contains-sql" | "contains-xml" | "contains" | "context-faithfulness" | "context-recall" | "context-relevance" | "equals" | "g-eval" | "icontains-all" | "icontains-any" | "icontains" | "is-json" | "is-refusal" | "is-sql" | "is-valid-openai-function-call" | "is-valid-openai-tools-call" | "is-xml" | "javascript" | "latency" | "levenshtein" | "llm-rubric" | "model-graded-closedqa" | "model-graded-factuality" | "perplexity-score" | "perplexity" | "python" | "regex" | "rouge-n" | "similar" | "starts-with" | "webhook" | "not-moderation" | "not-cost" | "not-factuality" | "not-answer-relevance" | "not-bleu" | "not-classifier" | "not-contains-all" | "not-contains-any" | "not-contains-json" | "not-contains-sql" | "not-contains-xml" | "not-contains" | "not-context-faithfulness" | "not-context-recall" | "not-context-relevance" | "not-equals" | "not-g-eval" | "not-icontains-all" | "not-icontains-any" | "not-icontains" | "not-is-json" | "not-is-refusal" | "not-is-sql" | "not-is-valid-openai-function-call" | "not-is-valid-openai-tools-call" | "not-is-xml" | "not-javascript" | "not-latency" | "not-levenshtein" | "not-llm-rubric" | "not-model-graded-closedqa" | "not-model-graded-factuality" | "not-perplexity-score" | "not-perplexity" | "not-python" | "not-regex" | "not-rouge-n" | "not-similar" | "not-starts-with" | "not-webhook" | "select-best" | "human";
|
|
967
988
|
value?: import("../types").AssertionValue | undefined;
|
|
968
989
|
config?: Record<string, any> | undefined;
|
|
969
990
|
provider?: any;
|
|
@@ -978,7 +999,7 @@ export declare const evalsTable: import("drizzle-orm/sqlite-core").SQLiteTableWi
|
|
|
978
999
|
} | {
|
|
979
1000
|
type: "assert-set";
|
|
980
1001
|
assert: {
|
|
981
|
-
type: "
|
|
1002
|
+
type: "moderation" | `promptfoo:redteam:${string}` | "cost" | "factuality" | "answer-relevance" | "bleu" | "classifier" | "contains-all" | "contains-any" | "contains-json" | "contains-sql" | "contains-xml" | "contains" | "context-faithfulness" | "context-recall" | "context-relevance" | "equals" | "g-eval" | "icontains-all" | "icontains-any" | "icontains" | "is-json" | "is-refusal" | "is-sql" | "is-valid-openai-function-call" | "is-valid-openai-tools-call" | "is-xml" | "javascript" | "latency" | "levenshtein" | "llm-rubric" | "model-graded-closedqa" | "model-graded-factuality" | "perplexity-score" | "perplexity" | "python" | "regex" | "rouge-n" | "similar" | "starts-with" | "webhook" | "not-moderation" | "not-cost" | "not-factuality" | "not-answer-relevance" | "not-bleu" | "not-classifier" | "not-contains-all" | "not-contains-any" | "not-contains-json" | "not-contains-sql" | "not-contains-xml" | "not-contains" | "not-context-faithfulness" | "not-context-recall" | "not-context-relevance" | "not-equals" | "not-g-eval" | "not-icontains-all" | "not-icontains-any" | "not-icontains" | "not-is-json" | "not-is-refusal" | "not-is-sql" | "not-is-valid-openai-function-call" | "not-is-valid-openai-tools-call" | "not-is-xml" | "not-javascript" | "not-latency" | "not-levenshtein" | "not-llm-rubric" | "not-model-graded-closedqa" | "not-model-graded-factuality" | "not-perplexity-score" | "not-perplexity" | "not-python" | "not-regex" | "not-rouge-n" | "not-similar" | "not-starts-with" | "not-webhook" | "select-best" | "human";
|
|
982
1003
|
value?: import("../types").AssertionValue | undefined;
|
|
983
1004
|
config?: Record<string, any> | undefined;
|
|
984
1005
|
provider?: any;
|
|
@@ -1097,6 +1118,7 @@ export declare const evalsTable: import("drizzle-orm/sqlite-core").SQLiteTableWi
|
|
|
1097
1118
|
WATSONX_AI_APIKEY?: string | undefined;
|
|
1098
1119
|
WATSONX_AI_PROJECT_ID?: string | undefined;
|
|
1099
1120
|
WATSONX_AI_BEARER_TOKEN?: string | undefined;
|
|
1121
|
+
WATSONX_AI_AUTH_TYPE?: string | undefined;
|
|
1100
1122
|
AZURE_CLIENT_SECRET?: string | undefined;
|
|
1101
1123
|
AZURE_CLIENT_ID?: string | undefined;
|
|
1102
1124
|
AZURE_TENANT_ID?: string | undefined;
|
|
@@ -1137,6 +1159,8 @@ export declare const evalsTable: import("drizzle-orm/sqlite-core").SQLiteTableWi
|
|
|
1137
1159
|
VERTEX_PROJECT_ID?: string | undefined;
|
|
1138
1160
|
VERTEX_PUBLISHER?: string | undefined;
|
|
1139
1161
|
VERTEX_REGION?: string | undefined;
|
|
1162
|
+
PROMPTFOO_CA_CERT_PATH?: string | undefined;
|
|
1163
|
+
PROMPTFOO_INSECURE_SSL?: string | undefined;
|
|
1140
1164
|
} | undefined;
|
|
1141
1165
|
} | (((args_0: string, args_1: {
|
|
1142
1166
|
vars: Record<string, string | {}>;
|
|
@@ -1179,6 +1203,7 @@ export declare const evalsTable: import("drizzle-orm/sqlite-core").SQLiteTableWi
|
|
|
1179
1203
|
WATSONX_AI_APIKEY?: string | undefined;
|
|
1180
1204
|
WATSONX_AI_PROJECT_ID?: string | undefined;
|
|
1181
1205
|
WATSONX_AI_BEARER_TOKEN?: string | undefined;
|
|
1206
|
+
WATSONX_AI_AUTH_TYPE?: string | undefined;
|
|
1182
1207
|
AZURE_CLIENT_SECRET?: string | undefined;
|
|
1183
1208
|
AZURE_CLIENT_ID?: string | undefined;
|
|
1184
1209
|
AZURE_TENANT_ID?: string | undefined;
|
|
@@ -1219,6 +1244,8 @@ export declare const evalsTable: import("drizzle-orm/sqlite-core").SQLiteTableWi
|
|
|
1219
1244
|
VERTEX_PROJECT_ID?: string | undefined;
|
|
1220
1245
|
VERTEX_PUBLISHER?: string | undefined;
|
|
1221
1246
|
VERTEX_REGION?: string | undefined;
|
|
1247
|
+
PROMPTFOO_CA_CERT_PATH?: string | undefined;
|
|
1248
|
+
PROMPTFOO_INSECURE_SSL?: string | undefined;
|
|
1222
1249
|
} | undefined;
|
|
1223
1250
|
}>)[] | undefined;
|
|
1224
1251
|
}>;
|
|
@@ -1439,6 +1466,7 @@ export declare const evalResultsTable: import("drizzle-orm/sqlite-core").SQLiteT
|
|
|
1439
1466
|
WATSONX_AI_APIKEY?: string | undefined;
|
|
1440
1467
|
WATSONX_AI_PROJECT_ID?: string | undefined;
|
|
1441
1468
|
WATSONX_AI_BEARER_TOKEN?: string | undefined;
|
|
1469
|
+
WATSONX_AI_AUTH_TYPE?: string | undefined;
|
|
1442
1470
|
AZURE_CLIENT_SECRET?: string | undefined;
|
|
1443
1471
|
AZURE_CLIENT_ID?: string | undefined;
|
|
1444
1472
|
AZURE_TENANT_ID?: string | undefined;
|
|
@@ -1479,6 +1507,8 @@ export declare const evalResultsTable: import("drizzle-orm/sqlite-core").SQLiteT
|
|
|
1479
1507
|
VERTEX_PROJECT_ID?: string | undefined;
|
|
1480
1508
|
VERTEX_PUBLISHER?: string | undefined;
|
|
1481
1509
|
VERTEX_REGION?: string | undefined;
|
|
1510
|
+
PROMPTFOO_CA_CERT_PATH?: string | undefined;
|
|
1511
|
+
PROMPTFOO_INSECURE_SSL?: string | undefined;
|
|
1482
1512
|
} | undefined;
|
|
1483
1513
|
} | {
|
|
1484
1514
|
callApi: import("../types").CallApiFunction;
|
|
@@ -1497,7 +1527,7 @@ export declare const evalResultsTable: import("drizzle-orm/sqlite-core").SQLiteT
|
|
|
1497
1527
|
description?: string | undefined;
|
|
1498
1528
|
providerOutput?: string | {} | undefined;
|
|
1499
1529
|
assert?: ({
|
|
1500
|
-
type: "
|
|
1530
|
+
type: "moderation" | `promptfoo:redteam:${string}` | "cost" | "factuality" | "answer-relevance" | "bleu" | "classifier" | "contains-all" | "contains-any" | "contains-json" | "contains-sql" | "contains-xml" | "contains" | "context-faithfulness" | "context-recall" | "context-relevance" | "equals" | "g-eval" | "icontains-all" | "icontains-any" | "icontains" | "is-json" | "is-refusal" | "is-sql" | "is-valid-openai-function-call" | "is-valid-openai-tools-call" | "is-xml" | "javascript" | "latency" | "levenshtein" | "llm-rubric" | "model-graded-closedqa" | "model-graded-factuality" | "perplexity-score" | "perplexity" | "python" | "regex" | "rouge-n" | "similar" | "starts-with" | "webhook" | "not-moderation" | "not-cost" | "not-factuality" | "not-answer-relevance" | "not-bleu" | "not-classifier" | "not-contains-all" | "not-contains-any" | "not-contains-json" | "not-contains-sql" | "not-contains-xml" | "not-contains" | "not-context-faithfulness" | "not-context-recall" | "not-context-relevance" | "not-equals" | "not-g-eval" | "not-icontains-all" | "not-icontains-any" | "not-icontains" | "not-is-json" | "not-is-refusal" | "not-is-sql" | "not-is-valid-openai-function-call" | "not-is-valid-openai-tools-call" | "not-is-xml" | "not-javascript" | "not-latency" | "not-levenshtein" | "not-llm-rubric" | "not-model-graded-closedqa" | "not-model-graded-factuality" | "not-perplexity-score" | "not-perplexity" | "not-python" | "not-regex" | "not-rouge-n" | "not-similar" | "not-starts-with" | "not-webhook" | "select-best" | "human";
|
|
1501
1531
|
value?: import("../types").AssertionValue | undefined;
|
|
1502
1532
|
config?: Record<string, any> | undefined;
|
|
1503
1533
|
provider?: any;
|
|
@@ -1512,7 +1542,7 @@ export declare const evalResultsTable: import("drizzle-orm/sqlite-core").SQLiteT
|
|
|
1512
1542
|
} | {
|
|
1513
1543
|
type: "assert-set";
|
|
1514
1544
|
assert: {
|
|
1515
|
-
type: "
|
|
1545
|
+
type: "moderation" | `promptfoo:redteam:${string}` | "cost" | "factuality" | "answer-relevance" | "bleu" | "classifier" | "contains-all" | "contains-any" | "contains-json" | "contains-sql" | "contains-xml" | "contains" | "context-faithfulness" | "context-recall" | "context-relevance" | "equals" | "g-eval" | "icontains-all" | "icontains-any" | "icontains" | "is-json" | "is-refusal" | "is-sql" | "is-valid-openai-function-call" | "is-valid-openai-tools-call" | "is-xml" | "javascript" | "latency" | "levenshtein" | "llm-rubric" | "model-graded-closedqa" | "model-graded-factuality" | "perplexity-score" | "perplexity" | "python" | "regex" | "rouge-n" | "similar" | "starts-with" | "webhook" | "not-moderation" | "not-cost" | "not-factuality" | "not-answer-relevance" | "not-bleu" | "not-classifier" | "not-contains-all" | "not-contains-any" | "not-contains-json" | "not-contains-sql" | "not-contains-xml" | "not-contains" | "not-context-faithfulness" | "not-context-recall" | "not-context-relevance" | "not-equals" | "not-g-eval" | "not-icontains-all" | "not-icontains-any" | "not-icontains" | "not-is-json" | "not-is-refusal" | "not-is-sql" | "not-is-valid-openai-function-call" | "not-is-valid-openai-tools-call" | "not-is-xml" | "not-javascript" | "not-latency" | "not-levenshtein" | "not-llm-rubric" | "not-model-graded-closedqa" | "not-model-graded-factuality" | "not-perplexity-score" | "not-perplexity" | "not-python" | "not-regex" | "not-rouge-n" | "not-similar" | "not-starts-with" | "not-webhook" | "select-best" | "human";
|
|
1516
1546
|
value?: import("../types").AssertionValue | undefined;
|
|
1517
1547
|
config?: Record<string, any> | undefined;
|
|
1518
1548
|
provider?: any;
|
|
@@ -1913,6 +1943,7 @@ export declare const datasetsTable: import("drizzle-orm/sqlite-core").SQLiteTabl
|
|
|
1913
1943
|
WATSONX_AI_APIKEY?: string | undefined;
|
|
1914
1944
|
WATSONX_AI_PROJECT_ID?: string | undefined;
|
|
1915
1945
|
WATSONX_AI_BEARER_TOKEN?: string | undefined;
|
|
1946
|
+
WATSONX_AI_AUTH_TYPE?: string | undefined;
|
|
1916
1947
|
AZURE_CLIENT_SECRET?: string | undefined;
|
|
1917
1948
|
AZURE_CLIENT_ID?: string | undefined;
|
|
1918
1949
|
AZURE_TENANT_ID?: string | undefined;
|
|
@@ -1953,6 +1984,8 @@ export declare const datasetsTable: import("drizzle-orm/sqlite-core").SQLiteTabl
|
|
|
1953
1984
|
VERTEX_PROJECT_ID?: string | undefined;
|
|
1954
1985
|
VERTEX_PUBLISHER?: string | undefined;
|
|
1955
1986
|
VERTEX_REGION?: string | undefined;
|
|
1987
|
+
PROMPTFOO_CA_CERT_PATH?: string | undefined;
|
|
1988
|
+
PROMPTFOO_INSECURE_SSL?: string | undefined;
|
|
1956
1989
|
} | undefined;
|
|
1957
1990
|
} | {
|
|
1958
1991
|
callApi: import("../types").CallApiFunction;
|
|
@@ -1971,7 +2004,7 @@ export declare const datasetsTable: import("drizzle-orm/sqlite-core").SQLiteTabl
|
|
|
1971
2004
|
description?: string | undefined;
|
|
1972
2005
|
providerOutput?: string | {} | undefined;
|
|
1973
2006
|
assert?: ({
|
|
1974
|
-
type: "
|
|
2007
|
+
type: "moderation" | `promptfoo:redteam:${string}` | "cost" | "factuality" | "answer-relevance" | "bleu" | "classifier" | "contains-all" | "contains-any" | "contains-json" | "contains-sql" | "contains-xml" | "contains" | "context-faithfulness" | "context-recall" | "context-relevance" | "equals" | "g-eval" | "icontains-all" | "icontains-any" | "icontains" | "is-json" | "is-refusal" | "is-sql" | "is-valid-openai-function-call" | "is-valid-openai-tools-call" | "is-xml" | "javascript" | "latency" | "levenshtein" | "llm-rubric" | "model-graded-closedqa" | "model-graded-factuality" | "perplexity-score" | "perplexity" | "python" | "regex" | "rouge-n" | "similar" | "starts-with" | "webhook" | "not-moderation" | "not-cost" | "not-factuality" | "not-answer-relevance" | "not-bleu" | "not-classifier" | "not-contains-all" | "not-contains-any" | "not-contains-json" | "not-contains-sql" | "not-contains-xml" | "not-contains" | "not-context-faithfulness" | "not-context-recall" | "not-context-relevance" | "not-equals" | "not-g-eval" | "not-icontains-all" | "not-icontains-any" | "not-icontains" | "not-is-json" | "not-is-refusal" | "not-is-sql" | "not-is-valid-openai-function-call" | "not-is-valid-openai-tools-call" | "not-is-xml" | "not-javascript" | "not-latency" | "not-levenshtein" | "not-llm-rubric" | "not-model-graded-closedqa" | "not-model-graded-factuality" | "not-perplexity-score" | "not-perplexity" | "not-python" | "not-regex" | "not-rouge-n" | "not-similar" | "not-starts-with" | "not-webhook" | "select-best" | "human";
|
|
1975
2008
|
value?: import("../types").AssertionValue | undefined;
|
|
1976
2009
|
config?: Record<string, any> | undefined;
|
|
1977
2010
|
provider?: any;
|
|
@@ -1986,7 +2019,7 @@ export declare const datasetsTable: import("drizzle-orm/sqlite-core").SQLiteTabl
|
|
|
1986
2019
|
} | {
|
|
1987
2020
|
type: "assert-set";
|
|
1988
2021
|
assert: {
|
|
1989
|
-
type: "
|
|
2022
|
+
type: "moderation" | `promptfoo:redteam:${string}` | "cost" | "factuality" | "answer-relevance" | "bleu" | "classifier" | "contains-all" | "contains-any" | "contains-json" | "contains-sql" | "contains-xml" | "contains" | "context-faithfulness" | "context-recall" | "context-relevance" | "equals" | "g-eval" | "icontains-all" | "icontains-any" | "icontains" | "is-json" | "is-refusal" | "is-sql" | "is-valid-openai-function-call" | "is-valid-openai-tools-call" | "is-xml" | "javascript" | "latency" | "levenshtein" | "llm-rubric" | "model-graded-closedqa" | "model-graded-factuality" | "perplexity-score" | "perplexity" | "python" | "regex" | "rouge-n" | "similar" | "starts-with" | "webhook" | "not-moderation" | "not-cost" | "not-factuality" | "not-answer-relevance" | "not-bleu" | "not-classifier" | "not-contains-all" | "not-contains-any" | "not-contains-json" | "not-contains-sql" | "not-contains-xml" | "not-contains" | "not-context-faithfulness" | "not-context-recall" | "not-context-relevance" | "not-equals" | "not-g-eval" | "not-icontains-all" | "not-icontains-any" | "not-icontains" | "not-is-json" | "not-is-refusal" | "not-is-sql" | "not-is-valid-openai-function-call" | "not-is-valid-openai-tools-call" | "not-is-xml" | "not-javascript" | "not-latency" | "not-levenshtein" | "not-llm-rubric" | "not-model-graded-closedqa" | "not-model-graded-factuality" | "not-perplexity-score" | "not-perplexity" | "not-python" | "not-regex" | "not-rouge-n" | "not-similar" | "not-starts-with" | "not-webhook" | "select-best" | "human";
|
|
1990
2023
|
value?: import("../types").AssertionValue | undefined;
|
|
1991
2024
|
config?: Record<string, any> | undefined;
|
|
1992
2025
|
provider?: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tables.d.ts","sourceRoot":"","sources":["../../../src/database/tables.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,KAAK,MAAM,EACX,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAElB,KAAK,eAAe,EAGpB,KAAK,iBAAiB,EAEvB,MAAM,UAAU,CAAC;AAIlB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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@@
|
|
|
1
|
-
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../src/fetch.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../src/fetch.ts"],"names":[],"mappings":"AAUA,wBAAsB,cAAc,CAClC,GAAG,EAAE,WAAW,EAChB,OAAO,GAAE,WAAgB,GACxB,OAAO,CAAC,QAAQ,CAAC,CA0DnB;AAED,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,WAAW,EAChB,OAAO,EAAE,WAAW,YAAK,EACzB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,QAAQ,CAAC,CAsBnB;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAazD;AAED,wBAAsB,eAAe,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAsBvE;AAED,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,WAAW,EAChB,OAAO,EAAE,WAAW,YAAK,EACzB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,MAAU,GAClB,OAAO,CAAC,QAAQ,CAAC,CAiDnB"}
|
package/dist/src/fetch.js
CHANGED
|
@@ -8,7 +8,10 @@ exports.fetchWithTimeout = fetchWithTimeout;
|
|
|
8
8
|
exports.isRateLimited = isRateLimited;
|
|
9
9
|
exports.handleRateLimit = handleRateLimit;
|
|
10
10
|
exports.fetchWithRetries = fetchWithRetries;
|
|
11
|
+
const fs_1 = __importDefault(require("fs"));
|
|
12
|
+
const path_1 = __importDefault(require("path"));
|
|
11
13
|
const proxy_agent_1 = require("proxy-agent");
|
|
14
|
+
const cliState_1 = __importDefault(require("./cliState"));
|
|
12
15
|
const constants_1 = require("./constants");
|
|
13
16
|
const envars_1 = require("./envars");
|
|
14
17
|
const logger_1 = __importDefault(require("./logger"));
|
|
@@ -49,9 +52,23 @@ async function fetchWithProxy(url, options = {}) {
|
|
|
49
52
|
logger_1.default.debug(`URL parsing failed in fetchWithProxy: ${e}`);
|
|
50
53
|
}
|
|
51
54
|
}
|
|
52
|
-
const
|
|
53
|
-
rejectUnauthorized: false,
|
|
54
|
-
}
|
|
55
|
+
const agentOptions = {
|
|
56
|
+
rejectUnauthorized: !(0, envars_1.getEnvBool)('PROMPTFOO_INSECURE_SSL', false),
|
|
57
|
+
};
|
|
58
|
+
// Support custom CA certificates
|
|
59
|
+
const caCertPath = (0, envars_1.getEnvString)('PROMPTFOO_CA_CERT_PATH');
|
|
60
|
+
if (caCertPath) {
|
|
61
|
+
try {
|
|
62
|
+
const resolvedPath = path_1.default.resolve(cliState_1.default.basePath || '', caCertPath);
|
|
63
|
+
const ca = fs_1.default.readFileSync(resolvedPath);
|
|
64
|
+
agentOptions.ca = ca;
|
|
65
|
+
logger_1.default.debug(`Using custom CA certificate from ${resolvedPath}`);
|
|
66
|
+
}
|
|
67
|
+
catch (e) {
|
|
68
|
+
logger_1.default.warn(`Failed to read CA certificate from ${caCertPath}: ${e}`);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
const agent = new proxy_agent_1.ProxyAgent(agentOptions);
|
|
55
72
|
return fetch(finalUrl, { ...finalOptions, agent });
|
|
56
73
|
}
|
|
57
74
|
function fetchWithTimeout(url, options = {}, timeout) {
|
package/dist/src/fetch.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch.js","sourceRoot":"","sources":["../../src/fetch.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"fetch.js","sourceRoot":"","sources":["../../src/fetch.ts"],"names":[],"mappings":";;;;;AAUA,wCA6DC;AAED,4CA0BC;AAED,sCAaC;AAED,0CAsBC;AAED,4CAsDC;AAlMD,4CAAoB;AACpB,gDAAwB;AACxB,6CAAyC;AACzC,0DAAkC;AAClC,2CAAsC;AACtC,qCAA+D;AAC/D,sDAA8B;AAC9B,iEAAyC;AACzC,sCAAoC;AAE7B,KAAK,UAAU,cAAc,CAClC,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ACxF,IAAI,CAAC,GAAG,UAAU,EAAE,CAAC;gBACnB,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;gBACnE,MAAM,IAAA,YAAK,EAAC,QAAQ,CAAC,CAAC;YACxB,CAAC;YACD,SAAS,GAAG,KAAK,CAAC;QACpB,CAAC;IACH,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,wBAAwB,UAAU,aAAc,SAAmB,CAAC,OAAO,EAAE,CAAC,CAAC;AACjG,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud.d.ts","sourceRoot":"","sources":["../../../src/globalConfig/cloud.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cloud.d.ts","sourceRoot":"","sources":["../../../src/globalConfig/cloud.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,QAAQ,QAAsD,CAAC;AAE5E,UAAU,SAAS;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,UAAU,iBAAiB;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,UAAU,QAAQ;IAChB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,qBAAa,WAAW;IACtB,OAAO,CAAC,MAAM,CAIZ;;IAWF,SAAS,IAAI,OAAO;IAIpB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAKjC,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAK/B,SAAS,IAAI,MAAM,GAAG,SAAS;IAI/B,UAAU,IAAI,MAAM;IAIpB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAK/B,SAAS,IAAI,MAAM;IAInB,MAAM,IAAI,IAAI;IAId,OAAO,CAAC,UAAU;IAKlB,OAAO,CAAC,MAAM;IASR,sBAAsB,CAC1B,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,GACd,OAAO,CAAC;QAAE,IAAI,EAAE,SAAS,CAAC;QAAC,YAAY,EAAE,iBAAiB,CAAC;QAAC,GAAG,EAAE,QAAQ,CAAA;KAAE,CAAC;CA4BhF;AAGD,eAAO,MAAM,WAAW,aAAoB,CAAC"}
|
|
@@ -3,17 +3,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.cloudConfig = exports.CloudConfig = void 0;
|
|
6
|
+
exports.cloudConfig = exports.CloudConfig = exports.API_HOST = void 0;
|
|
7
7
|
const fetch_1 = require("../fetch");
|
|
8
8
|
const logger_1 = __importDefault(require("../logger"));
|
|
9
9
|
const globalConfig_1 = require("./globalConfig");
|
|
10
|
-
|
|
10
|
+
exports.API_HOST = process.env.API_HOST || 'https://api.promptfoo.app';
|
|
11
11
|
class CloudConfig {
|
|
12
12
|
constructor() {
|
|
13
13
|
const savedConfig = (0, globalConfig_1.readGlobalConfig)()?.cloud || {};
|
|
14
14
|
this.config = {
|
|
15
15
|
appUrl: savedConfig.appUrl || 'https://www.promptfoo.app',
|
|
16
|
-
apiHost: savedConfig.apiHost || API_HOST,
|
|
16
|
+
apiHost: savedConfig.apiHost || exports.API_HOST,
|
|
17
17
|
apiKey: savedConfig.apiKey,
|
|
18
18
|
};
|
|
19
19
|
}
|
|
@@ -52,7 +52,7 @@ class CloudConfig {
|
|
|
52
52
|
const savedConfig = (0, globalConfig_1.readGlobalConfig)()?.cloud || {};
|
|
53
53
|
this.config = {
|
|
54
54
|
appUrl: savedConfig.appUrl || 'https://www.promptfoo.app',
|
|
55
|
-
apiHost: savedConfig.apiHost || API_HOST,
|
|
55
|
+
apiHost: savedConfig.apiHost || exports.API_HOST,
|
|
56
56
|
apiKey: savedConfig.apiKey,
|
|
57
57
|
};
|
|
58
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud.js","sourceRoot":"","sources":["../../../src/globalConfig/cloud.ts"],"names":[],"mappings":";;;;;;AAAA,oCAA0C;AAC1C,uDAA+B;AAC/B,iDAA4E;
|
|
1
|
+
{"version":3,"file":"cloud.js","sourceRoot":"","sources":["../../../src/globalConfig/cloud.ts"],"names":[],"mappings":";;;;;;AAAA,oCAA0C;AAC1C,uDAA+B;AAC/B,iDAA4E;AAE/D,QAAA,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,2BAA2B,CAAC;AAqB5E,MAAa,WAAW;IAOtB;QACE,MAAM,WAAW,GAAG,IAAA,+BAAgB,GAAE,EAAE,KAAK,IAAI,EAAE,CAAC;QACpD,IAAI,CAAC,MAAM,GAAG;YACZ,MAAM,EAAE,WAAW,CAAC,MAAM,IAAI,2BAA2B;YACzD,OAAO,EAAE,WAAW,CAAC,OAAO,IAAI,gBAAQ;YACxC,MAAM,EAAE,WAAW,CAAC,MAAM;SAC3B,CAAC;IACJ,CAAC;IAED,SAAS;QACP,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;IAC9B,CAAC;IAED,UAAU,CAAC,OAAe;QACxB,IAAI,CAAC,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;QAC9B,IAAI,CAAC,UAAU,EAAE,CAAC;IACpB,CAAC;IAED,SAAS,CAAC,MAAc;QACtB,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;QAC5B,IAAI,CAAC,UAAU,EAAE,CAAC;IACpB,CAAC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,MA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EAAE,YAAY,EAAE,GAAG,EAAE,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QAC1D,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QACtB,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QACzB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAExB,gBAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAC7B,gBAAM,CAAC,IAAI,CAAC,SAAS,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QACnC,gBAAM,CAAC,IAAI,CAAC,iBAAiB,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC;QAClD,gBAAM,CAAC,IAAI,CAAC,qBAAqB,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC;QAE5C,OAAO;YACL,IAAI;YACJ,YAAY;YACZ,GAAG;SACJ,CAAC;IACJ,CAAC;CACF;AAhGD,kCAgGC;AAED,8BAA8B;AACjB,QAAA,WAAW,GAAG,IAAI,WAAW,EAAE,CAAC"}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import assertions from './assertions';
|
|
2
2
|
import * as cache from './cache';
|
|
3
|
+
import { login } from './commands/auth';
|
|
3
4
|
import Eval from './models/eval';
|
|
4
5
|
import providers, { loadApiProvider } from './providers';
|
|
6
|
+
import { redteamRun } from './redteam/commands/run';
|
|
5
7
|
import { extractEntities } from './redteam/extraction/entities';
|
|
6
8
|
import { extractSystemPurpose } from './redteam/extraction/purpose';
|
|
7
9
|
import { RedteamPluginBase, RedteamGraderBase } from './redteam/plugins/base';
|
|
@@ -22,7 +24,15 @@ declare const redteam: {
|
|
|
22
24
|
Grader: typeof RedteamGraderBase;
|
|
23
25
|
};
|
|
24
26
|
};
|
|
25
|
-
|
|
27
|
+
declare const commands: {
|
|
28
|
+
auth: {
|
|
29
|
+
login: typeof login;
|
|
30
|
+
};
|
|
31
|
+
redteam: {
|
|
32
|
+
run: typeof redteamRun;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export { assertions, cache, evaluate, providers, redteam, commands };
|
|
26
36
|
declare const _default: {
|
|
27
37
|
assertions: {
|
|
28
38
|
runAssertion: typeof import("./assertions").runAssertion;
|
|
@@ -113,6 +123,14 @@ declare const _default: {
|
|
|
113
123
|
Grader: typeof RedteamGraderBase;
|
|
114
124
|
};
|
|
115
125
|
};
|
|
126
|
+
commands: {
|
|
127
|
+
auth: {
|
|
128
|
+
login: typeof login;
|
|
129
|
+
};
|
|
130
|
+
redteam: {
|
|
131
|
+
run: typeof redteamRun;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
116
134
|
};
|
|
117
135
|
export default _default;
|
|
118
136
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAIxC,OAAO,IAAI,MAAM,eAAe,CAAC;AAEjC,OAAO,SAAS,EAAE,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEzD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAGpE,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAI9E,OAAO,KAAK,EACV,eAAe,EAEf,iBAAiB,EAIlB,MAAM,SAAS,CAAC;AAKjB,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,iBAAe,QAAQ,CAAC,SAAS,EAAE,iBAAiB,EAAE,OAAO,GAAE,eAAoB,iBAwGlF;AAED,QAAA,MAAM,OAAO;;;;;;;;;;;;CAYZ,CAAC;AAEF,QAAA,MAAM,QAAQ;;;;;;;CAOb,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAErE,wBAOE"}
|