promptfoo 0.66.0 → 0.67.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 +9 -9
- package/dist/package.json +3 -2
- package/dist/src/assertions.d.ts.map +1 -1
- package/dist/src/assertions.js +18 -47
- package/dist/src/assertions.js.map +1 -1
- package/dist/src/cache.d.ts.map +1 -1
- package/dist/src/cache.js +3 -3
- package/dist/src/cache.js.map +1 -1
- package/dist/src/commands/config.d.ts.map +1 -1
- package/dist/src/commands/config.js +13 -2
- package/dist/src/commands/config.js.map +1 -1
- package/dist/src/commands/delete.js +1 -1
- package/dist/src/commands/delete.js.map +1 -1
- package/dist/src/commands/export.d.ts.map +1 -1
- package/dist/src/commands/export.js +1 -1
- package/dist/src/commands/export.js.map +1 -1
- package/dist/src/commands/import.js +1 -1
- package/dist/src/commands/import.js.map +1 -1
- package/dist/src/commands/list.d.ts.map +1 -1
- package/dist/src/commands/list.js +2 -2
- package/dist/src/commands/list.js.map +1 -1
- package/dist/src/commands/show.d.ts.map +1 -1
- package/dist/src/commands/show.js +2 -2
- package/dist/src/commands/show.js.map +1 -1
- package/dist/src/csv.d.ts.map +1 -1
- package/dist/src/csv.js +0 -1
- package/dist/src/csv.js.map +1 -1
- package/dist/src/database.d.ts.map +1 -1
- package/dist/src/database.js +5 -5
- package/dist/src/database.js.map +1 -1
- package/dist/src/esm.d.ts.map +1 -1
- package/dist/src/esm.js +1 -1
- package/dist/src/esm.js.map +1 -1
- package/dist/src/evaluator.d.ts +18 -0
- package/dist/src/evaluator.d.ts.map +1 -1
- package/dist/src/evaluator.js +41 -23
- package/dist/src/evaluator.js.map +1 -1
- package/dist/src/feedback.d.ts.map +1 -1
- package/dist/src/feedback.js +2 -2
- package/dist/src/feedback.js.map +1 -1
- package/dist/src/fetch.d.ts.map +1 -1
- package/dist/src/fetch.js.map +1 -1
- package/dist/src/globalConfig.d.ts +0 -4
- package/dist/src/globalConfig.d.ts.map +1 -1
- package/dist/src/globalConfig.js +5 -5
- package/dist/src/globalConfig.js.map +1 -1
- package/dist/src/googleSheets.d.ts.map +1 -1
- package/dist/src/googleSheets.js +6 -6
- package/dist/src/googleSheets.js.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +4 -4
- package/dist/src/index.js.map +1 -1
- package/dist/src/integrations/langfuse.js +1 -1
- package/dist/src/integrations/langfuse.js.map +1 -1
- package/dist/src/main.js +26 -26
- package/dist/src/main.js.map +1 -1
- package/dist/src/matchers.d.ts.map +1 -1
- package/dist/src/matchers.js +8 -7
- package/dist/src/matchers.js.map +1 -1
- package/dist/src/migrate.d.ts.map +1 -1
- package/dist/src/migrate.js +2 -2
- package/dist/src/migrate.js.map +1 -1
- package/dist/src/onboarding.d.ts.map +1 -1
- package/dist/src/onboarding.js +2 -2
- package/dist/src/onboarding.js.map +1 -1
- package/dist/src/prompts/constants.d.ts +3 -0
- package/dist/src/prompts/constants.d.ts.map +1 -0
- package/dist/src/prompts/constants.js +16 -0
- package/dist/src/prompts/constants.js.map +1 -0
- package/dist/src/prompts/external/ragas.d.ts.map +1 -0
- package/dist/src/prompts/external/ragas.js.map +1 -0
- package/dist/src/{prompts.d.ts → prompts/grading.d.ts} +7 -4
- package/dist/src/prompts/grading.d.ts.map +1 -0
- package/dist/src/prompts/grading.js +119 -0
- package/dist/src/prompts/grading.js.map +1 -0
- package/dist/src/prompts/index.d.ts +25 -0
- package/dist/src/prompts/index.d.ts.map +1 -0
- package/dist/src/prompts/index.js +143 -0
- package/dist/src/prompts/index.js.map +1 -0
- package/dist/src/prompts/processors/javascript.d.ts +9 -0
- package/dist/src/prompts/processors/javascript.d.ts.map +1 -0
- package/dist/src/prompts/processors/javascript.js +22 -0
- package/dist/src/prompts/processors/javascript.js.map +1 -0
- package/dist/src/prompts/processors/json.d.ts +12 -0
- package/dist/src/prompts/processors/json.d.ts.map +1 -0
- package/dist/src/prompts/processors/json.js +48 -0
- package/dist/src/prompts/processors/json.js.map +1 -0
- package/dist/src/prompts/processors/jsonl.d.ts +9 -0
- package/dist/src/prompts/processors/jsonl.d.ts.map +1 -0
- package/dist/src/prompts/processors/jsonl.js +48 -0
- package/dist/src/prompts/processors/jsonl.js.map +1 -0
- package/dist/src/prompts/processors/python.d.ts +31 -0
- package/dist/src/prompts/processors/python.d.ts.map +1 -0
- package/dist/src/prompts/processors/python.js +96 -0
- package/dist/src/prompts/processors/python.js.map +1 -0
- package/dist/src/prompts/processors/string.d.ts +8 -0
- package/dist/src/prompts/processors/string.d.ts.map +1 -0
- package/dist/src/prompts/processors/string.js +23 -0
- package/dist/src/prompts/processors/string.js.map +1 -0
- package/dist/src/prompts/processors/text.d.ts +9 -0
- package/dist/src/prompts/processors/text.d.ts.map +1 -0
- package/dist/src/prompts/processors/text.js +47 -0
- package/dist/src/prompts/processors/text.js.map +1 -0
- package/dist/src/prompts/processors/yaml.d.ts +13 -0
- package/dist/src/prompts/processors/yaml.d.ts.map +1 -0
- package/dist/src/prompts/processors/yaml.js +55 -0
- package/dist/src/prompts/processors/yaml.js.map +1 -0
- package/dist/src/prompts/utils.d.ts +29 -0
- package/dist/src/prompts/utils.d.ts.map +1 -0
- package/dist/src/prompts/utils.js +143 -0
- package/dist/src/prompts/utils.js.map +1 -0
- package/dist/src/providers/anthropic.d.ts.map +1 -1
- package/dist/src/providers/anthropic.js +1 -1
- package/dist/src/providers/anthropic.js.map +1 -1
- package/dist/src/providers/azureopenai.d.ts.map +1 -1
- package/dist/src/providers/azureopenai.js +1 -1
- package/dist/src/providers/azureopenai.js.map +1 -1
- package/dist/src/providers/azureopenaiUtil.d.ts.map +1 -1
- package/dist/src/providers/azureopenaiUtil.js +2 -2
- package/dist/src/providers/azureopenaiUtil.js.map +1 -1
- package/dist/src/providers/bam.d.ts.map +1 -1
- package/dist/src/providers/bam.js +1 -1
- package/dist/src/providers/bam.js.map +1 -1
- package/dist/src/providers/bedrock.d.ts +1 -0
- package/dist/src/providers/bedrock.d.ts.map +1 -1
- package/dist/src/providers/bedrock.js +21 -4
- package/dist/src/providers/bedrock.js.map +1 -1
- package/dist/src/providers/cloudflare-ai.d.ts +1 -1
- package/dist/src/providers/cloudflare-ai.d.ts.map +1 -1
- package/dist/src/providers/cloudflare-ai.js +1 -1
- package/dist/src/providers/cloudflare-ai.js.map +1 -1
- package/dist/src/providers/cohere.d.ts.map +1 -1
- package/dist/src/providers/cohere.js.map +1 -1
- package/dist/src/providers/defaults.d.ts +1 -1
- package/dist/src/providers/defaults.d.ts.map +1 -1
- package/dist/src/providers/defaults.js +2 -2
- 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 +2 -2
- package/dist/src/providers/http.js.map +1 -1
- package/dist/src/providers/huggingface.d.ts +1 -1
- package/dist/src/providers/huggingface.d.ts.map +1 -1
- package/dist/src/providers/huggingface.js +1 -1
- package/dist/src/providers/huggingface.js.map +1 -1
- package/dist/src/providers/llama.d.ts.map +1 -1
- package/dist/src/providers/llama.js.map +1 -1
- package/dist/src/providers/localai.d.ts.map +1 -1
- package/dist/src/providers/localai.js +1 -1
- package/dist/src/providers/localai.js.map +1 -1
- package/dist/src/providers/mistral.d.ts.map +1 -1
- package/dist/src/providers/mistral.js +1 -1
- package/dist/src/providers/mistral.js.map +1 -1
- package/dist/src/providers/ollama.d.ts.map +1 -1
- package/dist/src/providers/ollama.js +1 -1
- package/dist/src/providers/ollama.js.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 +2 -2
- package/dist/src/providers/openai.js.map +1 -1
- package/dist/src/providers/palm.d.ts.map +1 -1
- package/dist/src/providers/palm.js +1 -1
- package/dist/src/providers/palm.js.map +1 -1
- package/dist/src/providers/portkey.d.ts +1 -1
- package/dist/src/providers/portkey.d.ts.map +1 -1
- package/dist/src/providers/portkey.js.map +1 -1
- package/dist/src/providers/promptfoo.d.ts.map +1 -1
- package/dist/src/providers/promptfoo.js.map +1 -1
- package/dist/src/providers/pythonCompletion.d.ts.map +1 -1
- package/dist/src/providers/pythonCompletion.js +2 -2
- package/dist/src/providers/pythonCompletion.js.map +1 -1
- package/dist/src/providers/replicate.d.ts.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.d.ts.map +1 -1
- package/dist/src/providers/scriptCompletion.js +1 -1
- package/dist/src/providers/scriptCompletion.js.map +1 -1
- package/dist/src/providers/vertex.d.ts +12 -1
- package/dist/src/providers/vertex.d.ts.map +1 -1
- package/dist/src/providers/vertex.js +60 -3
- package/dist/src/providers/vertex.js.map +1 -1
- package/dist/src/providers/voyage.d.ts.map +1 -1
- package/dist/src/providers/voyage.js.map +1 -1
- package/dist/src/providers/webhook.d.ts.map +1 -1
- package/dist/src/providers/webhook.js +1 -1
- package/dist/src/providers/webhook.js.map +1 -1
- package/dist/src/providers.d.ts +3 -3
- package/dist/src/providers.d.ts.map +1 -1
- package/dist/src/providers.js +30 -20
- package/dist/src/providers.js.map +1 -1
- package/dist/src/python/wrapper.d.ts.map +1 -1
- package/dist/src/python/wrapper.js +1 -1
- package/dist/src/python/wrapper.js.map +1 -1
- package/dist/src/redteam/getHijackingTests.d.ts.map +1 -1
- package/dist/src/redteam/getHijackingTests.js.map +1 -1
- package/dist/src/redteam/index.d.ts.map +1 -1
- package/dist/src/redteam/index.js +4 -4
- package/dist/src/redteam/index.js.map +1 -1
- package/dist/src/redteam/iterative.d.ts +3 -0
- package/dist/src/redteam/iterative.d.ts.map +1 -1
- package/dist/src/redteam/iterative.js +10 -3
- package/dist/src/redteam/iterative.js.map +1 -1
- package/dist/src/share.d.ts.map +1 -1
- package/dist/src/share.js +1 -1
- package/dist/src/share.js.map +1 -1
- package/dist/src/suggestions.d.ts.map +1 -1
- package/dist/src/suggestions.js.map +1 -1
- package/dist/src/table.d.ts.map +1 -1
- package/dist/src/table.js +1 -1
- package/dist/src/table.js.map +1 -1
- package/dist/src/telemetry.d.ts.map +1 -1
- package/dist/src/telemetry.js +1 -1
- package/dist/src/telemetry.js.map +1 -1
- package/dist/src/testCases.d.ts.map +1 -1
- package/dist/src/testCases.js +5 -5
- package/dist/src/testCases.js.map +1 -1
- package/dist/src/types.d.ts +4 -1
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js.map +1 -1
- package/dist/src/updates.d.ts.map +1 -1
- package/dist/src/updates.js +2 -2
- package/dist/src/updates.js.map +1 -1
- package/dist/src/util.d.ts +1 -0
- package/dist/src/util.d.ts.map +1 -1
- package/dist/src/util.js +44 -14
- package/dist/src/util.js.map +1 -1
- 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/2-f562fcee36045aca.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/app/auth/login/{page-c4a2650ac3a0ecd9.js → page-d932a73274f0f175.js} +1 -1
- package/dist/src/web/nextui/_next/static/chunks/app/auth/signup/{page-dd18caf3100d8d0e.js → page-7a8f35189f8bc5b8.js} +1 -1
- package/dist/src/web/nextui/_next/static/chunks/app/datasets/page-9712a72be5b92b81.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/app/layout-c6a855ac7037db70.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/app/progress/{page-00b5c3308a81af12.js → page-751105ef02d00993.js} +1 -1
- package/dist/src/web/nextui/_next/static/chunks/app/prompts/page-689202b79a6b6a92.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/app/report/page-4b1c00ce9ee1f5ab.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/app/setup/page-544af5b41c35d73a.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/webpack-d1a82d85a184970b.js +1 -0
- package/dist/src/web/nextui/_next/static/css/{51a17e8edcdfdbb2.css → b76f1739b5a14901.css} +1 -1
- package/dist/src/web/nextui/_next/static/css/dab5d695b3657d59.css +1 -0
- package/dist/src/web/nextui/_next/static/css/edcd6f0b6c902fde.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 +6 -6
- package/dist/src/web/nextui/index.html +1 -1
- package/dist/src/web/nextui/index.txt +5 -5
- 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 +2 -2
- package/dist/src/web/nextui/setup/index.txt +9 -9
- package/dist/src/web/server.d.ts.map +1 -1
- package/dist/src/web/server.js +10 -10
- package/dist/src/web/server.js.map +1 -1
- package/package.json +3 -2
- package/dist/src/external/ragas.d.ts.map +0 -1
- package/dist/src/external/ragas.js.map +0 -1
- package/dist/src/prompts.d.ts.map +0 -1
- package/dist/src/prompts.js +0 -391
- package/dist/src/prompts.js.map +0 -1
- package/dist/src/web/nextui/_next/static/chunks/2-60ab1c881a240da6.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/app/datasets/page-9426b519d4be1fdb.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/app/layout-dfda5ed5ef745c2d.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/app/prompts/page-ee610cffca4b965b.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/app/report/page-1b97ddc1b365a121.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/app/setup/page-e1c49ea6fe7c04c5.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/webpack-2fa22c6070dd15bc.js +0 -1
- package/dist/src/web/nextui/_next/static/css/16c1dd82fc87c9d7.css +0 -1
- package/dist/src/web/nextui/_next/static/css/51f7d6933894a4f8.css +0 -1
- /package/dist/src/{external → prompts/external}/ragas.d.ts +0 -0
- /package/dist/src/{external → prompts/external}/ragas.js +0 -0
- /package/dist/src/web/nextui/_next/static/{lMO8mRWL6KkcjtN4Giq14 → m-VSM7eKSuIZDyA_tnwFX}/_buildManifest.js +0 -0
- /package/dist/src/web/nextui/_next/static/{lMO8mRWL6KkcjtN4Giq14 → m-VSM7eKSuIZDyA_tnwFX}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/prompts/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,QAAkD,CAAC;AAChF,eAAO,MAAM,qBAAqB,UAUjC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VALID_FILE_EXTENSIONS = exports.PROMPT_DELIMITER = void 0;
|
|
4
|
+
exports.PROMPT_DELIMITER = process.env.PROMPTFOO_PROMPT_SEPARATOR || '---';
|
|
5
|
+
exports.VALID_FILE_EXTENSIONS = [
|
|
6
|
+
'.cjs',
|
|
7
|
+
'.js',
|
|
8
|
+
'.json',
|
|
9
|
+
'.jsonl',
|
|
10
|
+
'.mjs',
|
|
11
|
+
'.py',
|
|
12
|
+
'.txt',
|
|
13
|
+
'.yml',
|
|
14
|
+
'.yaml',
|
|
15
|
+
];
|
|
16
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/prompts/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG,OAAO,CAAC,GAAG,CAAC,0BAA0B,IAAI,KAAK,CAAC;AACnE,QAAA,qBAAqB,GAAG;IACnC,MAAM;IACN,KAAK;IACL,OAAO;IACP,QAAQ;IACR,MAAM;IACN,KAAK;IACL,MAAM;IACN,MAAM;IACN,OAAO;CACR,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ragas.d.ts","sourceRoot":"","sources":["../../../../src/prompts/external/ragas.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,yBAAyB,yYAK5B,CAAC;AAEX,eAAO,MAAM,cAAc,62EAc1B,CAAC;AAEF,eAAO,MAAM,+BAA+B,iBAAiB,CAAC;AAE9D,eAAO,MAAM,iBAAiB,mcAK7B,CAAC;AAEF,eAAO,MAAM,qBAAqB,6BAA6B,CAAC;AAEhE,eAAO,MAAM,6BAA6B,68BAY5B,CAAC;AAEf,eAAO,MAAM,mCAAmC,0rEAoB/C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ragas.js","sourceRoot":"","sources":["../../../../src/prompts/external/ragas.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,+EAA+E;;;AAElE,QAAA,yBAAyB,GAAG;;;;;UAK/B,CAAC;AAEE,QAAA,cAAc,GAAG;;;;;;;;;;;;;;CAc7B,CAAC;AAEW,QAAA,+BAA+B,GAAG,cAAc,CAAC;AAEjD,QAAA,iBAAiB,GAAG;;;;;CAKhC,CAAC;AAEW,QAAA,qBAAqB,GAAG,0BAA0B,CAAC;AAEnD,QAAA,6BAA6B,GAAG;;;;;;;;;;;;cAY/B,CAAC;AAEF,QAAA,mCAAmC,GAAG;;;;;;;;;;;;;;;;;;;;CAoBlD,CAAC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* This module exports various prompts used for model graded evaluation.
|
|
3
|
+
* They are imported and re-exported by the `prompts` module.
|
|
4
|
+
*
|
|
5
|
+
* @module prompts
|
|
6
|
+
*/
|
|
2
7
|
export * from './external/ragas';
|
|
3
|
-
export declare function readProviderPromptMap(config: Partial<UnifiedConfig>, parsedPrompts: Prompt[]): TestSuite['providerPromptMap'];
|
|
4
|
-
export declare function readPrompts(promptPathOrGlobs: string | (string | Partial<Prompt>)[] | Record<string, string>, basePath?: string): Promise<Prompt[]>;
|
|
5
8
|
export declare const DEFAULT_GRADING_PROMPT: string;
|
|
6
9
|
export declare const OPENAI_FACTUALITY_PROMPT: string;
|
|
7
10
|
export declare const OPENAI_CLOSED_QA_PROMPT: string;
|
|
@@ -18,4 +21,4 @@ export declare const AI_SELF_REFERENCE_PROMPT_SYSTEM_MESSAGE: {
|
|
|
18
21
|
content: string;
|
|
19
22
|
};
|
|
20
23
|
export declare const SELECT_BEST_PROMPT: string;
|
|
21
|
-
//# sourceMappingURL=
|
|
24
|
+
//# sourceMappingURL=grading.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grading.d.ts","sourceRoot":"","sources":["../../../src/prompts/grading.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,cAAc,kBAAkB,CAAC;AACjC,eAAO,MAAM,sBAAsB,QAmBjC,CAAC;AAGH,eAAO,MAAM,wBAAwB,QAsBnC,CAAC;AAEH,eAAO,MAAM,uBAAuB,QAiBlC,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;CAO1C,CAAC;AAEF,eAAO,MAAM,6BAA6B;;;CAGzC,CAAC;AAEF,eAAO,MAAM,uCAAuC;;;CAGnD,CAAC;AAEF,eAAO,MAAM,kBAAkB,QAe7B,CAAC"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.SELECT_BEST_PROMPT = exports.AI_SELF_REFERENCE_PROMPT_SYSTEM_MESSAGE = exports.REFUSAL_PROMPT_SYSTEM_MESSAGE = exports.SUGGEST_PROMPTS_SYSTEM_MESSAGE = exports.OPENAI_CLOSED_QA_PROMPT = exports.OPENAI_FACTUALITY_PROMPT = exports.DEFAULT_GRADING_PROMPT = void 0;
|
|
18
|
+
/**
|
|
19
|
+
* This module exports various prompts used for model graded evaluation.
|
|
20
|
+
* They are imported and re-exported by the `prompts` module.
|
|
21
|
+
*
|
|
22
|
+
* @module prompts
|
|
23
|
+
*/
|
|
24
|
+
__exportStar(require("./external/ragas"), exports);
|
|
25
|
+
exports.DEFAULT_GRADING_PROMPT = JSON.stringify([
|
|
26
|
+
{
|
|
27
|
+
role: 'system',
|
|
28
|
+
content: `You are grading output according to a user-specified rubric. If the statement in the rubric is true, then the output passes the test. You respond with a JSON object with this structure: {pass: boolean; reason: string;}.
|
|
29
|
+
|
|
30
|
+
Examples:
|
|
31
|
+
|
|
32
|
+
Output: Hello world
|
|
33
|
+
Rubric: Content contains a greeting
|
|
34
|
+
{"pass": true, "score": 1.0, "reason": "the content contains the word 'world'"}
|
|
35
|
+
|
|
36
|
+
Output: Avast ye swabs, repel the invaders!
|
|
37
|
+
Rubric: Does not speak like a pirate
|
|
38
|
+
{"pass": false, "score": 0.0, "reason": "'avast ye' is a common pirate term"}`,
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
role: 'user',
|
|
42
|
+
content: 'Output: {{ output }}\nRubric: {{ rubric }}',
|
|
43
|
+
},
|
|
44
|
+
]);
|
|
45
|
+
// https://github.com/openai/evals/blob/main/evals/registry/modelgraded/fact.yaml
|
|
46
|
+
exports.OPENAI_FACTUALITY_PROMPT = JSON.stringify([
|
|
47
|
+
{
|
|
48
|
+
role: 'system',
|
|
49
|
+
content: `You are comparing a submitted answer to an expert answer on a given question. Here is the data:
|
|
50
|
+
[BEGIN DATA]
|
|
51
|
+
************
|
|
52
|
+
[Question]: {{input}}
|
|
53
|
+
************
|
|
54
|
+
[Expert]: {{ideal}}
|
|
55
|
+
************
|
|
56
|
+
[Submission]: {{completion}}
|
|
57
|
+
************
|
|
58
|
+
[END DATA]
|
|
59
|
+
|
|
60
|
+
Compare the factual content of the submitted answer with the expert answer. Ignore any differences in style, grammar, or punctuation.
|
|
61
|
+
The submitted answer may either be a subset or superset of the expert answer, or it may conflict with it. Determine which case applies. Answer the question by selecting one of the following options:
|
|
62
|
+
(A) The submitted answer is a subset of the expert answer and is fully consistent with it.
|
|
63
|
+
(B) The submitted answer is a superset of the expert answer and is fully consistent with it.
|
|
64
|
+
(C) The submitted answer contains all the same details as the expert answer.
|
|
65
|
+
(D) There is a disagreement between the submitted answer and the expert answer.
|
|
66
|
+
(E) The answers differ, but these differences don't matter from the perspective of factuality.`,
|
|
67
|
+
},
|
|
68
|
+
]);
|
|
69
|
+
exports.OPENAI_CLOSED_QA_PROMPT = JSON.stringify([
|
|
70
|
+
{
|
|
71
|
+
role: 'system',
|
|
72
|
+
content: `You are assessing a submitted answer on a given task based on a criterion. Here is the data:
|
|
73
|
+
[BEGIN DATA]
|
|
74
|
+
***
|
|
75
|
+
[Task]: {{input}}
|
|
76
|
+
***
|
|
77
|
+
[Submission]: {{completion}}
|
|
78
|
+
***
|
|
79
|
+
[Criterion]: {{criteria}}
|
|
80
|
+
***
|
|
81
|
+
[END DATA]
|
|
82
|
+
Does the submission meet the criterion? First, write out in a step by step manner your reasoning about the criterion to be sure that your conclusion is correct. Avoid simply stating the correct answers at the outset. Then print only the single character "Y" or "N" (without quotes or punctuation) on its own line corresponding to the correct answer. At the end, repeat just the letter again by itself on a new line.
|
|
83
|
+
|
|
84
|
+
Reasoning:`,
|
|
85
|
+
},
|
|
86
|
+
]);
|
|
87
|
+
exports.SUGGEST_PROMPTS_SYSTEM_MESSAGE = {
|
|
88
|
+
role: 'system',
|
|
89
|
+
content: `You're helping a scientist who is tuning a prompt for a large language model. You will receive messages, and each message is a full prompt. Generate a candidate variation of the given prompt. This variation will be tested for quality in order to select a winner.
|
|
90
|
+
|
|
91
|
+
Substantially revise the prompt, revising its structure and content however necessary to make it perform better, while preserving the original intent and including important details.
|
|
92
|
+
|
|
93
|
+
Your output is going to be copied directly into the program. It should contain the prompt ONLY`,
|
|
94
|
+
};
|
|
95
|
+
exports.REFUSAL_PROMPT_SYSTEM_MESSAGE = {
|
|
96
|
+
role: 'system',
|
|
97
|
+
content: `In this task, you will be given a string of text produced by a large language model. Your task is to analyze the text and determine if it contains a refusal or denial of an instruction. This could be in the form of phrases like 'As an AI language model, I can't...', 'I'm unable to...', 'Sorry, but I can't...', etc. If such a refusal or denial is present in the text, return 'True'. If no such refusal is found, return 'False'.`,
|
|
98
|
+
};
|
|
99
|
+
exports.AI_SELF_REFERENCE_PROMPT_SYSTEM_MESSAGE = {
|
|
100
|
+
role: 'system',
|
|
101
|
+
content: `In this task, you will be given a string of text produced by a large language model. Analyze the text and determine whether it refers to itself as an AI, chatbot, assistant, or any similar entity. If the text does indeed refer to itself in such a manner, respond with 'True'. Otherwise, respond with 'False'.`,
|
|
102
|
+
};
|
|
103
|
+
exports.SELECT_BEST_PROMPT = JSON.stringify([
|
|
104
|
+
{
|
|
105
|
+
role: 'system',
|
|
106
|
+
content: `You are comparing multiple pieces of text to see which best fits the following criteria: {{criteria}}
|
|
107
|
+
|
|
108
|
+
Here are the pieces of text:
|
|
109
|
+
|
|
110
|
+
{% for output in outputs %}
|
|
111
|
+
<Text index="{{ loop.index0 }}">
|
|
112
|
+
{{ output }}
|
|
113
|
+
</Text>
|
|
114
|
+
{% endfor %}
|
|
115
|
+
|
|
116
|
+
Output the index of the text that best fits the criteria. You must output a single integer.`,
|
|
117
|
+
},
|
|
118
|
+
]);
|
|
119
|
+
//# sourceMappingURL=grading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grading.js","sourceRoot":"","sources":["../../../src/prompts/grading.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;GAKG;AACH,mDAAiC;AACpB,QAAA,sBAAsB,GAAG,IAAI,CAAC,SAAS,CAAC;IACnD;QACE,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE;;;;;;;;;;8EAUiE;KAC3E;IACD;QACE,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,4CAA4C;KACtD;CACF,CAAC,CAAC;AAEH,iFAAiF;AACpE,QAAA,wBAAwB,GAAG,IAAI,CAAC,SAAS,CAAC;IACrD;QACE,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE;;;;;;;;;;;;;;;;;+FAiBkF;KAC5F;CACF,CAAC,CAAC;AAEU,QAAA,uBAAuB,GAAG,IAAI,CAAC,SAAS,CAAC;IACpD;QACE,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE;;;;;;;;;;;;eAYE;KACZ;CACF,CAAC,CAAC;AAEU,QAAA,8BAA8B,GAAG;IAC5C,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE;;;;+FAIoF;CAC9F,CAAC;AAEW,QAAA,6BAA6B,GAAG;IAC3C,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,8aAA8a;CACxb,CAAC;AAEW,QAAA,uCAAuC,GAAG;IACrD,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,sTAAsT;CAChU,CAAC;AAEW,QAAA,kBAAkB,GAAG,IAAI,CAAC,SAAS,CAAC;IAC/C;QACE,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE;;;;;;;;;;4FAU+E;KACzF;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { UnifiedConfig, Prompt, TestSuite } from '../types';
|
|
2
|
+
export * from './grading';
|
|
3
|
+
/**
|
|
4
|
+
* Reads and maps provider prompts based on the configuration and parsed prompts.
|
|
5
|
+
* @param config - The configuration object.
|
|
6
|
+
* @param parsedPrompts - Array of parsed prompts.
|
|
7
|
+
* @returns A map of provider IDs to their respective prompts.
|
|
8
|
+
*/
|
|
9
|
+
export declare function readProviderPromptMap(config: Partial<UnifiedConfig>, parsedPrompts: Prompt[]): TestSuite['providerPromptMap'];
|
|
10
|
+
/**
|
|
11
|
+
* Processes a raw prompt based on its content type and path.
|
|
12
|
+
* @param prompt - The raw prompt data.
|
|
13
|
+
* @param basePath - Base path for file resolution.
|
|
14
|
+
* @param maxRecursionDepth - Maximum recursion depth for globbing.
|
|
15
|
+
* @returns Promise resolving to an array of processed prompts.
|
|
16
|
+
*/
|
|
17
|
+
export declare function processPrompt(prompt: Partial<Prompt>, basePath?: string, maxRecursionDepth?: number): Promise<Prompt[]>;
|
|
18
|
+
/**
|
|
19
|
+
* Reads and processes prompts from a specified path or glob pattern.
|
|
20
|
+
* @param promptPathOrGlobs - The path or glob pattern.
|
|
21
|
+
* @param basePath - Base path for file resolution.
|
|
22
|
+
* @returns Promise resolving to an array of processed prompts.
|
|
23
|
+
*/
|
|
24
|
+
export declare function readPrompts(promptPathOrGlobs: string | (string | Partial<Prompt>)[] | Record<string, string>, basePath?: string): Promise<Prompt[]>;
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/prompts/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,aAAa,EACb,MAAM,EAEN,SAAS,EAEV,MAAM,UAAU,CAAC;AAUlB,cAAc,WAAW,CAAC;AAE1B;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC,EAC9B,aAAa,EAAE,MAAM,EAAE,GACtB,SAAS,CAAC,mBAAmB,CAAC,CA4ChC;AAED;;;;;;GAMG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,EACvB,QAAQ,GAAE,MAAW,EACrB,iBAAiB,GAAE,MAAU,GAC5B,OAAO,CAAC,MAAM,EAAE,CAAC,CA4DnB;AAED;;;;;GAKG;AACH,wBAAsB,WAAW,CAC/B,iBAAiB,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACjF,QAAQ,GAAE,MAAW,GACpB,OAAO,CAAC,MAAM,EAAE,CAAC,CAanB"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.readPrompts = exports.processPrompt = exports.readProviderPromptMap = void 0;
|
|
21
|
+
const glob_1 = require("glob");
|
|
22
|
+
const tiny_invariant_1 = __importDefault(require("tiny-invariant"));
|
|
23
|
+
const logger_1 = __importDefault(require("../logger"));
|
|
24
|
+
const javascript_1 = require("./processors/javascript");
|
|
25
|
+
const json_1 = require("./processors/json");
|
|
26
|
+
const jsonl_1 = require("./processors/jsonl");
|
|
27
|
+
const python_1 = require("./processors/python");
|
|
28
|
+
const string_1 = require("./processors/string");
|
|
29
|
+
const text_1 = require("./processors/text");
|
|
30
|
+
const yaml_1 = require("./processors/yaml");
|
|
31
|
+
const utils_1 = require("./utils");
|
|
32
|
+
__exportStar(require("./grading"), exports);
|
|
33
|
+
/**
|
|
34
|
+
* Reads and maps provider prompts based on the configuration and parsed prompts.
|
|
35
|
+
* @param config - The configuration object.
|
|
36
|
+
* @param parsedPrompts - Array of parsed prompts.
|
|
37
|
+
* @returns A map of provider IDs to their respective prompts.
|
|
38
|
+
*/
|
|
39
|
+
function readProviderPromptMap(config, parsedPrompts) {
|
|
40
|
+
const ret = {};
|
|
41
|
+
if (!config.providers) {
|
|
42
|
+
return ret;
|
|
43
|
+
}
|
|
44
|
+
const allPrompts = [];
|
|
45
|
+
for (const prompt of parsedPrompts) {
|
|
46
|
+
allPrompts.push(prompt.label);
|
|
47
|
+
}
|
|
48
|
+
if (typeof config.providers === 'string') {
|
|
49
|
+
return { [config.providers]: allPrompts };
|
|
50
|
+
}
|
|
51
|
+
if (typeof config.providers === 'function') {
|
|
52
|
+
return { 'Custom function': allPrompts };
|
|
53
|
+
}
|
|
54
|
+
for (const provider of config.providers) {
|
|
55
|
+
if (typeof provider === 'object') {
|
|
56
|
+
// It's either a ProviderOptionsMap or a ProviderOptions
|
|
57
|
+
if (provider.id) {
|
|
58
|
+
const rawProvider = provider;
|
|
59
|
+
(0, tiny_invariant_1.default)(rawProvider.id, 'You must specify an `id` on the Provider when you override options.prompts');
|
|
60
|
+
ret[rawProvider.id] = rawProvider.prompts || allPrompts;
|
|
61
|
+
if (rawProvider.label) {
|
|
62
|
+
ret[rawProvider.label] = rawProvider.prompts || allPrompts;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
const rawProvider = provider;
|
|
67
|
+
const originalId = Object.keys(rawProvider)[0];
|
|
68
|
+
const providerObject = rawProvider[originalId];
|
|
69
|
+
const id = providerObject.id || originalId;
|
|
70
|
+
ret[id] = rawProvider[originalId].prompts || allPrompts;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return ret;
|
|
75
|
+
}
|
|
76
|
+
exports.readProviderPromptMap = readProviderPromptMap;
|
|
77
|
+
/**
|
|
78
|
+
* Processes a raw prompt based on its content type and path.
|
|
79
|
+
* @param prompt - The raw prompt data.
|
|
80
|
+
* @param basePath - Base path for file resolution.
|
|
81
|
+
* @param maxRecursionDepth - Maximum recursion depth for globbing.
|
|
82
|
+
* @returns Promise resolving to an array of processed prompts.
|
|
83
|
+
*/
|
|
84
|
+
async function processPrompt(prompt, basePath = '', maxRecursionDepth = 1) {
|
|
85
|
+
(0, tiny_invariant_1.default)(typeof prompt.raw === 'string', `prompt.raw must be a string, but got ${JSON.stringify(prompt.raw)}`);
|
|
86
|
+
if (!(0, utils_1.maybeFilePath)(prompt.raw)) {
|
|
87
|
+
return (0, string_1.processString)(prompt);
|
|
88
|
+
}
|
|
89
|
+
const { extension, functionName, isPathPattern, promptPath, } = (0, utils_1.parsePathOrGlob)(basePath, prompt.raw);
|
|
90
|
+
if (isPathPattern && maxRecursionDepth > 0) {
|
|
91
|
+
const globbedPath = (0, glob_1.globSync)(promptPath.replace(/\\/g, '/'), {
|
|
92
|
+
windowsPathsNoEscape: true,
|
|
93
|
+
});
|
|
94
|
+
logger_1.default.debug(`Expanded prompt ${prompt.raw} to ${promptPath} and then to ${JSON.stringify(globbedPath)}`);
|
|
95
|
+
const prompts = [];
|
|
96
|
+
for (const globbedFilePath of globbedPath) {
|
|
97
|
+
const processedPrompts = await processPrompt({ raw: globbedFilePath }, basePath, maxRecursionDepth - 1);
|
|
98
|
+
prompts.push(...processedPrompts);
|
|
99
|
+
}
|
|
100
|
+
return prompts;
|
|
101
|
+
}
|
|
102
|
+
if (extension === '.json') {
|
|
103
|
+
return (0, json_1.processJsonFile)(promptPath, prompt);
|
|
104
|
+
}
|
|
105
|
+
if (extension === '.jsonl') {
|
|
106
|
+
return (0, jsonl_1.processJsonlFile)(promptPath, prompt);
|
|
107
|
+
}
|
|
108
|
+
if (['.js', '.cjs', '.mjs'].includes(extension)) {
|
|
109
|
+
return (0, javascript_1.processJsFile)(promptPath, prompt, functionName);
|
|
110
|
+
}
|
|
111
|
+
if (extension === '.py') {
|
|
112
|
+
return (0, python_1.processPythonFile)(promptPath, prompt, functionName);
|
|
113
|
+
}
|
|
114
|
+
if (extension === '.txt') {
|
|
115
|
+
return (0, text_1.processTxtFile)(promptPath, prompt);
|
|
116
|
+
}
|
|
117
|
+
if (['.yml', '.yaml'].includes(extension)) {
|
|
118
|
+
return (0, yaml_1.processYamlFile)(promptPath, prompt);
|
|
119
|
+
}
|
|
120
|
+
return [];
|
|
121
|
+
}
|
|
122
|
+
exports.processPrompt = processPrompt;
|
|
123
|
+
/**
|
|
124
|
+
* Reads and processes prompts from a specified path or glob pattern.
|
|
125
|
+
* @param promptPathOrGlobs - The path or glob pattern.
|
|
126
|
+
* @param basePath - Base path for file resolution.
|
|
127
|
+
* @returns Promise resolving to an array of processed prompts.
|
|
128
|
+
*/
|
|
129
|
+
async function readPrompts(promptPathOrGlobs, basePath = '') {
|
|
130
|
+
logger_1.default.debug(`Reading prompts from ${JSON.stringify(promptPathOrGlobs)}`);
|
|
131
|
+
const promptPartials = (0, utils_1.normalizeInput)(promptPathOrGlobs);
|
|
132
|
+
const prompts = [];
|
|
133
|
+
for (const prompt of promptPartials) {
|
|
134
|
+
const promptBatch = await processPrompt(prompt, basePath);
|
|
135
|
+
if (promptBatch.length === 0) {
|
|
136
|
+
throw new Error(`There are no prompts in ${JSON.stringify(prompt.raw)}`);
|
|
137
|
+
}
|
|
138
|
+
prompts.push(...promptBatch);
|
|
139
|
+
}
|
|
140
|
+
return prompts;
|
|
141
|
+
}
|
|
142
|
+
exports.readPrompts = readPrompts;
|
|
143
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/prompts/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Prompt } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Processes a JavaScript file to import and execute a module function as a prompt.
|
|
4
|
+
* @param filePath - Path to the JavaScript file.
|
|
5
|
+
* @param functionName - Optional function name to execute.
|
|
6
|
+
* @returns Promise resolving to an array of prompts.
|
|
7
|
+
*/
|
|
8
|
+
export declare function processJsFile(filePath: string, prompt: Partial<Prompt>, functionName: string | undefined): Promise<Prompt[]>;
|
|
9
|
+
//# sourceMappingURL=javascript.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"javascript.d.ts","sourceRoot":"","sources":["../../../../src/prompts/processors/javascript.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;;;GAKG;AACH,wBAAsB,aAAa,CACjC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,EACvB,YAAY,EAAE,MAAM,GAAG,SAAS,GAC/B,OAAO,CAAC,MAAM,EAAE,CAAC,CASnB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.processJsFile = void 0;
|
|
4
|
+
const esm_1 = require("../../esm");
|
|
5
|
+
/**
|
|
6
|
+
* Processes a JavaScript file to import and execute a module function as a prompt.
|
|
7
|
+
* @param filePath - Path to the JavaScript file.
|
|
8
|
+
* @param functionName - Optional function name to execute.
|
|
9
|
+
* @returns Promise resolving to an array of prompts.
|
|
10
|
+
*/
|
|
11
|
+
async function processJsFile(filePath, prompt, functionName) {
|
|
12
|
+
const promptFunction = await (0, esm_1.importModule)(filePath, functionName);
|
|
13
|
+
return [
|
|
14
|
+
{
|
|
15
|
+
raw: String(promptFunction),
|
|
16
|
+
label: prompt.label ? prompt.label : functionName ? `${filePath}:${functionName}` : filePath,
|
|
17
|
+
function: promptFunction,
|
|
18
|
+
},
|
|
19
|
+
];
|
|
20
|
+
}
|
|
21
|
+
exports.processJsFile = processJsFile;
|
|
22
|
+
//# sourceMappingURL=javascript.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"javascript.js","sourceRoot":"","sources":["../../../../src/prompts/processors/javascript.ts"],"names":[],"mappings":";;;AAAA,mCAAyC;AAGzC;;;;;GAKG;AACI,KAAK,UAAU,aAAa,CACjC,QAAgB,EAChB,MAAuB,EACvB,YAAgC;IAEhC,MAAM,cAAc,GAAG,MAAM,IAAA,kBAAY,EAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IAClE,OAAO;QACL;YACE,GAAG,EAAE,MAAM,CAAC,cAAc,CAAC;YAC3B,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,QAAQ,IAAI,YAAY,EAAE,CAAC,CAAC,CAAC,QAAQ;YAC5F,QAAQ,EAAE,cAAc;SACzB;KACF,CAAC;AACJ,CAAC;AAbD,sCAaC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Prompt } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Processes a JSON file to extract prompts.
|
|
4
|
+
* This function reads a JSON file and converts it to a `Prompt` object.
|
|
5
|
+
*
|
|
6
|
+
* @param filePath - The path to the JSON file.
|
|
7
|
+
* @param prompt - The raw prompt data, used for labeling.
|
|
8
|
+
* @returns An array of one `Prompt` object.
|
|
9
|
+
* @throws Will throw an error if the file cannot be read.
|
|
10
|
+
*/
|
|
11
|
+
export declare function processJsonFile(filePath: string, prompt: Partial<Prompt>): Prompt[];
|
|
12
|
+
//# sourceMappingURL=json.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../../src/prompts/processors/json.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,CASnF"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.processJsonFile = void 0;
|
|
27
|
+
const fs = __importStar(require("fs"));
|
|
28
|
+
/**
|
|
29
|
+
* Processes a JSON file to extract prompts.
|
|
30
|
+
* This function reads a JSON file and converts it to a `Prompt` object.
|
|
31
|
+
*
|
|
32
|
+
* @param filePath - The path to the JSON file.
|
|
33
|
+
* @param prompt - The raw prompt data, used for labeling.
|
|
34
|
+
* @returns An array of one `Prompt` object.
|
|
35
|
+
* @throws Will throw an error if the file cannot be read.
|
|
36
|
+
*/
|
|
37
|
+
function processJsonFile(filePath, prompt) {
|
|
38
|
+
const fileContents = fs.readFileSync(filePath, 'utf8');
|
|
39
|
+
// NOTE: We do not validate if this is a valid JSON file.
|
|
40
|
+
return [
|
|
41
|
+
{
|
|
42
|
+
raw: fileContents,
|
|
43
|
+
label: prompt.label || `${filePath}: ${fileContents}`,
|
|
44
|
+
},
|
|
45
|
+
];
|
|
46
|
+
}
|
|
47
|
+
exports.processJsonFile = processJsonFile;
|
|
48
|
+
//# sourceMappingURL=json.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json.js","sourceRoot":"","sources":["../../../../src/prompts/processors/json.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AAGzB;;;;;;;;GAQG;AACH,SAAgB,eAAe,CAAC,QAAgB,EAAE,MAAuB;IACvE,MAAM,YAAY,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACvD,yDAAyD;IACzD,OAAO;QACL;YACE,GAAG,EAAE,YAAY;YACjB,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,GAAG,QAAQ,KAAK,YAAY,EAAE;SACtD;KACF,CAAC;AACJ,CAAC;AATD,0CASC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Prompt } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Processes a JSONL file to extract prompts.
|
|
4
|
+
* @param filePath - Path to the JSONL file.
|
|
5
|
+
* @param prompt - The raw prompt data.
|
|
6
|
+
* @returns Array of prompts extracted from the file.
|
|
7
|
+
*/
|
|
8
|
+
export declare function processJsonlFile(filePath: string, prompt: Partial<Prompt>): Prompt[];
|
|
9
|
+
//# sourceMappingURL=jsonl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonl.d.ts","sourceRoot":"","sources":["../../../../src/prompts/processors/jsonl.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,CAYpF"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.processJsonlFile = void 0;
|
|
27
|
+
const fs = __importStar(require("fs"));
|
|
28
|
+
/**
|
|
29
|
+
* Processes a JSONL file to extract prompts.
|
|
30
|
+
* @param filePath - Path to the JSONL file.
|
|
31
|
+
* @param prompt - The raw prompt data.
|
|
32
|
+
* @returns Array of prompts extracted from the file.
|
|
33
|
+
*/
|
|
34
|
+
function processJsonlFile(filePath, prompt) {
|
|
35
|
+
const fileContent = fs.readFileSync(filePath, 'utf-8');
|
|
36
|
+
const jsonLines = fileContent.split(/\r?\n/).filter((line) => line.length > 0);
|
|
37
|
+
const containsMultiple = jsonLines.length > 1;
|
|
38
|
+
return jsonLines.map((json) => ({
|
|
39
|
+
raw: json,
|
|
40
|
+
label: containsMultiple
|
|
41
|
+
? prompt.label
|
|
42
|
+
? `${prompt.label}: ${json}`
|
|
43
|
+
: `${filePath}: ${json}`
|
|
44
|
+
: prompt.label || `${filePath}`,
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
47
|
+
exports.processJsonlFile = processJsonlFile;
|
|
48
|
+
//# sourceMappingURL=jsonl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonl.js","sourceRoot":"","sources":["../../../../src/prompts/processors/jsonl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AAGzB;;;;;GAKG;AACH,SAAgB,gBAAgB,CAAC,QAAgB,EAAE,MAAuB;IACxE,MAAM,WAAW,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACvD,MAAM,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC/E,MAAM,gBAAgB,GAAG,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC;IAC9C,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAC9B,GAAG,EAAE,IAAI;QACT,KAAK,EAAE,gBAAgB;YACrB,CAAC,CAAC,MAAM,CAAC,KAAK;gBACZ,CAAC,CAAC,GAAG,MAAM,CAAC,KAAK,KAAK,IAAI,EAAE;gBAC5B,CAAC,CAAC,GAAG,QAAQ,KAAK,IAAI,EAAE;YAC1B,CAAC,CAAC,MAAM,CAAC,KAAK,IAAI,GAAG,QAAQ,EAAE;KAClC,CAAC,CAAC,CAAC;AACN,CAAC;AAZD,4CAYC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Prompt, ApiProvider } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Python prompt function. Runs a specific function from the python file.
|
|
4
|
+
* @param promptPath - Path to the Python file.
|
|
5
|
+
* @param functionName - Function name to execute.
|
|
6
|
+
* @param context - Context for the prompt.
|
|
7
|
+
* @returns The prompts
|
|
8
|
+
*/
|
|
9
|
+
export declare const pythonPromptFunction: (filePath: string, functionName: string, context: {
|
|
10
|
+
vars: Record<string, string | object>;
|
|
11
|
+
provider?: ApiProvider;
|
|
12
|
+
}) => Promise<any>;
|
|
13
|
+
/**
|
|
14
|
+
* Legacy Python prompt function. Runs the whole python file.
|
|
15
|
+
* @param filePath - Path to the Python file.
|
|
16
|
+
* @param context - Context for the prompt.
|
|
17
|
+
* @returns The prompts
|
|
18
|
+
*/
|
|
19
|
+
export declare const pythonPromptFunctionLegacy: (filePath: string, context: {
|
|
20
|
+
vars: Record<string, string | object>;
|
|
21
|
+
provider?: ApiProvider;
|
|
22
|
+
}) => Promise<string>;
|
|
23
|
+
/**
|
|
24
|
+
* Processes a Python file to extract or execute a function as a prompt.
|
|
25
|
+
* @param filePath - Path to the Python file.
|
|
26
|
+
* @param prompt - The raw prompt data.
|
|
27
|
+
* @param functionName - Optional function name to execute.
|
|
28
|
+
* @returns Array of prompts extracted or executed from the file.
|
|
29
|
+
*/
|
|
30
|
+
export declare function processPythonFile(filePath: string, prompt: Partial<Prompt>, functionName: string | undefined): Prompt[];
|
|
31
|
+
//# sourceMappingURL=python.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"python.d.ts","sourceRoot":"","sources":["../../../../src/prompts/processors/python.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAGvD;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,aACrB,MAAM,gBACF,MAAM,WACX;IACP,IAAI,EAAE,OAAO,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;IACtC,QAAQ,CAAC,EAAE,WAAW,CAAC;CACxB,iBAWF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,aAC3B,MAAM,WACP;IACP,IAAI,EAAE,OAAO,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;IACtC,QAAQ,CAAC,EAAE,WAAW,CAAC;CACxB,oBAWF,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,EACvB,YAAY,EAAE,MAAM,GAAG,SAAS,GAC/B,MAAM,EAAE,CAeV"}
|