@promptbook/markdown-utils 0.75.0-1 → 0.75.0-4
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 +28 -17
- package/esm/index.es.js +266 -250
- package/esm/index.es.js.map +1 -1
- package/esm/typings/{promptbook-collection → books}/index.d.ts +6 -6
- package/esm/typings/src/_packages/core.index.d.ts +28 -20
- package/esm/typings/src/_packages/types.index.d.ts +62 -52
- package/esm/typings/src/_packages/utils.index.d.ts +2 -2
- package/esm/typings/src/cli/cli-commands/about.d.ts +1 -0
- package/esm/typings/src/cli/cli-commands/hello.d.ts +1 -0
- package/esm/typings/src/cli/cli-commands/make.d.ts +1 -0
- package/esm/typings/src/cli/cli-commands/prettify.d.ts +1 -0
- package/esm/typings/src/cli/cli-commands/run.d.ts +1 -0
- package/esm/typings/src/cli/cli-commands/test-command.d.ts +1 -0
- package/esm/typings/src/cli/main.d.ts +1 -0
- package/esm/typings/src/collection/PipelineCollection.d.ts +1 -1
- package/esm/typings/src/collection/SimplePipelineCollection.d.ts +1 -1
- package/esm/typings/src/collection/collectionToJson.d.ts +1 -1
- package/esm/typings/src/collection/constructors/createCollectionFromJson.d.ts +1 -1
- package/esm/typings/src/collection/constructors/createCollectionFromPromise.d.ts +1 -1
- package/esm/typings/src/commands/EXPECT/ExpectCommand.d.ts +3 -3
- package/esm/typings/src/commands/EXPECT/expectCommandParser.d.ts +2 -2
- package/esm/typings/src/commands/FOREACH/foreachCommandParser.d.ts +2 -2
- package/esm/typings/src/commands/FORMAT/formatCommandParser.d.ts +2 -2
- package/esm/typings/src/commands/JOKER/jokerCommandParser.d.ts +2 -2
- package/esm/typings/src/commands/POSTPROCESS/postprocessCommandParser.d.ts +2 -2
- package/esm/typings/src/commands/SECTION/SectionCommand.d.ts +11 -0
- package/esm/typings/src/commands/{TEMPLATE/templateCommandParser.d.ts → SECTION/sectionCommandParser.d.ts} +6 -6
- package/esm/typings/src/commands/_common/types/Command.d.ts +1 -1
- package/esm/typings/src/commands/_common/types/CommandParser.d.ts +17 -19
- package/esm/typings/src/commands/_common/types/CommandUsagePlaces.d.ts +1 -1
- package/esm/typings/src/commands/index.d.ts +4 -1
- package/esm/typings/src/config.d.ts +11 -3
- package/esm/typings/src/conversion/pipelineJsonToString.d.ts +3 -3
- package/esm/typings/src/conversion/pipelineStringToJson.d.ts +2 -2
- package/esm/typings/src/conversion/pipelineStringToJsonSync.d.ts +3 -3
- package/esm/typings/src/conversion/prettify/prettifyPipelineString.d.ts +1 -1
- package/esm/typings/src/conversion/prettify/renderPipelineMermaidOptions.d.ts +4 -4
- package/esm/typings/src/conversion/utils/extractParameterNamesFromTask.d.ts +15 -0
- package/esm/typings/src/conversion/utils/renameParameter.d.ts +3 -3
- package/esm/typings/src/conversion/validation/_importPipeline.d.ts +3 -2
- package/esm/typings/src/conversion/validation/validatePipeline.d.ts +1 -1
- package/esm/typings/src/dialogs/simple-prompt/SimplePromptInterfaceTools.d.ts +1 -1
- package/esm/typings/src/errors/index.d.ts +3 -0
- package/esm/typings/src/execution/PipelineExecutorResult.d.ts +2 -2
- package/esm/typings/src/execution/PromptResultUsage.d.ts +1 -1
- package/esm/typings/src/execution/ScriptExecutionTools.d.ts +1 -1
- package/esm/typings/src/execution/createPipelineExecutor/{$OngoingTemplateResult.d.ts → $OngoingTaskResult.d.ts} +1 -1
- package/esm/typings/src/execution/createPipelineExecutor/00-CreatePipelineExecutorOptions.d.ts +1 -1
- package/esm/typings/src/execution/createPipelineExecutor/10-executePipeline.d.ts +1 -1
- package/esm/typings/src/execution/createPipelineExecutor/{20-executeTemplate.d.ts → 20-executeTask.d.ts} +7 -7
- package/esm/typings/src/execution/createPipelineExecutor/40-executeAttempts.d.ts +5 -5
- package/esm/typings/src/execution/createPipelineExecutor/filterJustOutputParameters.d.ts +1 -1
- package/esm/typings/src/execution/createPipelineExecutor/{getContextForTemplate.d.ts → getContextForTask.d.ts} +2 -2
- package/esm/typings/src/execution/createPipelineExecutor/{getExamplesForTemplate.d.ts → getExamplesForTask.d.ts} +2 -2
- package/esm/typings/src/execution/createPipelineExecutor/getKnowledgeForTask.d.ts +27 -0
- package/esm/typings/src/execution/createPipelineExecutor/getReservedParametersForTask.d.ts +30 -0
- package/esm/typings/src/{types → execution}/execution-report/ExecutionPromptReportJson.d.ts +2 -2
- package/esm/typings/src/{types → execution}/execution-report/ExecutionReportJson.d.ts +4 -4
- package/esm/typings/src/{types → execution}/execution-report/ExecutionReportStringOptions.d.ts +1 -1
- package/esm/typings/src/execution/utils/checkExpectations.d.ts +1 -1
- package/esm/typings/src/execution/utils/usage-constants.d.ts +3 -0
- package/esm/typings/src/formats/index.d.ts +3 -0
- package/esm/typings/src/formfactors/_boilerplate/BoilerplateFormfactorDefinition.d.ts +2 -2
- package/esm/typings/src/formfactors/_common/AbstractFormfactorDefinition.d.ts +7 -1
- package/esm/typings/src/formfactors/_common/FormfactorDefinition.d.ts +3 -0
- package/esm/typings/src/formfactors/chatbot/ChatbotFormfactorDefinition.d.ts +45 -0
- package/esm/typings/src/formfactors/generator/GeneratorFormfactorDefinition.d.ts +14 -0
- package/esm/typings/src/formfactors/generic/GenericFormfactorDefinition.d.ts +3 -3
- package/esm/typings/src/formfactors/index.d.ts +85 -12
- package/esm/typings/src/formfactors/matcher/MatcherFormfactorDefinition.d.ts +14 -0
- package/esm/typings/src/formfactors/sheets/SheetsFormfactorDefinition.d.ts +13 -3
- package/esm/typings/src/formfactors/translator/TranslatorFormfactorDefinition.d.ts +13 -3
- package/esm/typings/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +1 -0
- package/esm/typings/src/llm-providers/anthropic-claude/register-configuration.d.ts +3 -0
- package/esm/typings/src/llm-providers/anthropic-claude/register-constructor.d.ts +1 -0
- package/esm/typings/src/llm-providers/azure-openai/register-configuration.d.ts +3 -0
- package/esm/typings/src/llm-providers/azure-openai/register-constructor.d.ts +1 -0
- package/esm/typings/src/llm-providers/mocked/$fakeTextToExpectations.d.ts +1 -1
- package/esm/typings/src/llm-providers/openai/openai-models.d.ts +1 -0
- package/esm/typings/src/llm-providers/openai/register-configuration.d.ts +3 -0
- package/esm/typings/src/llm-providers/openai/register-constructor.d.ts +1 -0
- package/esm/typings/src/personas/preparePersona.d.ts +1 -1
- package/esm/typings/src/pipeline/PipelineInterface/PipelineInterface.d.ts +26 -0
- package/esm/typings/src/pipeline/PipelineInterface/constants.d.ts +14 -0
- package/esm/typings/src/pipeline/{pipeline-interface → PipelineInterface}/getPipelineInterface.d.ts +3 -1
- package/esm/typings/src/pipeline/{pipeline-interface → PipelineInterface}/isPipelineImplementingInterface.d.ts +5 -1
- package/esm/typings/src/pipeline/{pipeline-interface → PipelineInterface}/isPipelineInterfacesEqual.d.ts +2 -0
- package/esm/typings/src/{types/PipelineJson/TemplateJsonCommon.d.ts → pipeline/PipelineJson/CommonTaskJson.d.ts} +24 -24
- package/esm/typings/src/pipeline/PipelineJson/DialogTaskJson.d.ts +13 -0
- package/esm/typings/src/{types → pipeline}/PipelineJson/Expectations.d.ts +2 -2
- package/esm/typings/src/{types → pipeline}/PipelineJson/KnowledgePieceJson.d.ts +7 -6
- package/esm/typings/src/{types → pipeline}/PipelineJson/KnowledgeSourceJson.d.ts +3 -3
- package/esm/typings/src/pipeline/PipelineJson/ParameterJson.d.ts +98 -0
- package/esm/typings/src/{types → pipeline}/PipelineJson/PersonaJson.d.ts +5 -5
- package/esm/typings/src/{types → pipeline}/PipelineJson/PipelineJson.d.ts +11 -11
- package/esm/typings/src/{types → pipeline}/PipelineJson/PreparationJson.d.ts +1 -1
- package/esm/typings/src/{types/PipelineJson/PromptTemplateJson.d.ts → pipeline/PipelineJson/PromptTaskJson.d.ts} +8 -8
- package/esm/typings/src/pipeline/PipelineJson/ScriptTaskJson.d.ts +20 -0
- package/esm/typings/src/pipeline/PipelineJson/SimpleTaskJson.d.ts +13 -0
- package/esm/typings/src/pipeline/PipelineJson/TaskJson.d.ts +11 -0
- package/esm/typings/src/{types → pipeline}/PipelineString.d.ts +1 -1
- package/esm/typings/src/prepare/isPipelinePrepared.d.ts +3 -3
- package/esm/typings/src/prepare/preparePipeline.d.ts +1 -1
- package/esm/typings/src/prepare/prepareTasks.d.ts +32 -0
- package/esm/typings/src/prepare/unpreparePipeline.d.ts +1 -1
- package/esm/typings/src/scrapers/_common/Scraper.d.ts +1 -1
- package/esm/typings/src/scrapers/_common/prepareKnowledgePieces.d.ts +2 -2
- package/esm/typings/src/scrapers/_common/utils/makeKnowledgeSourceHandler.d.ts +1 -1
- package/esm/typings/src/scrapers/document/DocumentScraper.d.ts +1 -1
- package/esm/typings/src/scrapers/document/register-constructor.d.ts +1 -0
- package/esm/typings/src/scrapers/document/register-metadata.d.ts +3 -0
- package/esm/typings/src/scrapers/document-legacy/LegacyDocumentScraper.d.ts +1 -1
- package/esm/typings/src/scrapers/document-legacy/register-constructor.d.ts +1 -0
- package/esm/typings/src/scrapers/document-legacy/register-metadata.d.ts +3 -0
- package/esm/typings/src/scrapers/markdown/MarkdownScraper.d.ts +1 -1
- package/esm/typings/src/scrapers/markdown/register-constructor.d.ts +1 -0
- package/esm/typings/src/scrapers/markdown/register-metadata.d.ts +3 -0
- package/esm/typings/src/scrapers/pdf/PdfScraper.d.ts +1 -1
- package/esm/typings/src/scrapers/pdf/register-constructor.d.ts +1 -0
- package/esm/typings/src/scrapers/pdf/register-metadata.d.ts +3 -0
- package/esm/typings/src/scrapers/website/WebsiteScraper.d.ts +1 -1
- package/esm/typings/src/scrapers/website/register-constructor.d.ts +1 -0
- package/esm/typings/src/scrapers/website/register-metadata.d.ts +3 -0
- package/esm/typings/src/scripting/javascript/postprocessing-functions.d.ts +1 -0
- package/esm/typings/src/types/Prompt.d.ts +4 -4
- package/esm/typings/src/types/SectionType.d.ts +21 -0
- package/esm/typings/src/types/TaskProgress.d.ts +2 -2
- package/esm/typings/src/types/TaskType.d.ts +15 -0
- package/esm/typings/src/types/typeAliasEmoji.d.ts +3 -0
- package/esm/typings/src/types/typeAliases.d.ts +2 -1
- package/esm/typings/src/utils/emojis.d.ts +1 -0
- package/esm/typings/src/utils/expectation-counters/constants.d.ts +1 -0
- package/esm/typings/src/utils/expectation-counters/countCharacters.d.ts +1 -1
- package/esm/typings/src/utils/expectation-counters/countLines.d.ts +1 -1
- package/esm/typings/src/utils/expectation-counters/countPages.d.ts +1 -1
- package/esm/typings/src/utils/expectation-counters/countParagraphs.d.ts +1 -1
- package/esm/typings/src/utils/expectation-counters/countSentences.d.ts +1 -1
- package/esm/typings/src/utils/expectation-counters/countWords.d.ts +1 -1
- package/esm/typings/src/utils/expectation-counters/index.d.ts +3 -2
- package/esm/typings/src/utils/normalization/normalize-to-kebab-case.d.ts +3 -0
- package/esm/typings/src/utils/organization/TODO_remove_as.d.ts +6 -0
- package/esm/typings/src/utils/parameters/extractParameterNames.d.ts +2 -2
- package/esm/typings/src/utils/serialization/clonePipeline.d.ts +1 -1
- package/esm/typings/src/version.d.ts +2 -1
- package/package.json +4 -3
- package/umd/index.umd.js +266 -250
- package/umd/index.umd.js.map +1 -1
- package/esm/typings/src/commands/TEMPLATE/TemplateCommand.d.ts +0 -11
- package/esm/typings/src/commands/TEMPLATE/TemplateTypes.d.ts +0 -15
- package/esm/typings/src/conversion/utils/extractParameterNamesFromTemplate.d.ts +0 -15
- package/esm/typings/src/execution/createPipelineExecutor/getKnowledgeForTemplate.d.ts +0 -27
- package/esm/typings/src/execution/createPipelineExecutor/getReservedParametersForTemplate.d.ts +0 -30
- package/esm/typings/src/formfactors/chat/ChatFormfactorDefinition.d.ts +0 -15
- package/esm/typings/src/pipeline/pipeline-interface/PipelineInterface.d.ts +0 -22
- package/esm/typings/src/pipeline/pipeline-interface/constants.d.ts +0 -9
- package/esm/typings/src/prepare/prepareTemplates.d.ts +0 -32
- package/esm/typings/src/types/PipelineJson/DialogTemplateJson.d.ts +0 -13
- package/esm/typings/src/types/PipelineJson/ParameterJson.d.ts +0 -39
- package/esm/typings/src/types/PipelineJson/ScriptTemplateJson.d.ts +0 -20
- package/esm/typings/src/types/PipelineJson/SimpleTemplateJson.d.ts +0 -13
- package/esm/typings/src/types/PipelineJson/TemplateJson.d.ts +0 -11
- /package/esm/typings/src/commands/{TEMPLATE/templateCommand.test.d.ts → SECTION/sectionCommand.test.d.ts} +0 -0
- /package/esm/typings/src/conversion/utils/{extractParameterNamesFromTemplate.test.d.ts → extractParameterNamesFromTask.test.d.ts} +0 -0
- /package/esm/typings/src/{types → execution}/execution-report/ExecutionReportString.d.ts +0 -0
- /package/esm/typings/src/{types → execution}/execution-report/countWorkingDuration.d.ts +0 -0
- /package/esm/typings/src/{types → execution}/execution-report/countWorkingDuration.test.d.ts +0 -0
- /package/esm/typings/src/{types → execution}/execution-report/executionReportJsonToString.d.ts +0 -0
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import type { PipelineInterface } from '../../pipeline/
|
|
1
|
+
import type { PipelineInterface } from '../../pipeline/PipelineInterface/PipelineInterface';
|
|
2
2
|
import type { string_markdown_text } from '../../types/typeAliases';
|
|
3
3
|
import type { string_name } from '../../types/typeAliases';
|
|
4
4
|
import type { string_promptbook_documentation_url } from '../../types/typeAliases';
|
|
5
5
|
import type { string_SCREAMING_CASE } from '../../utils/normalization/normalizeTo_SCREAMING_CASE';
|
|
6
6
|
/**
|
|
7
7
|
* @@@
|
|
8
|
+
*
|
|
9
|
+
* Note: [🚉] This is fully serializable as JSON
|
|
10
|
+
* @see https://github.com/webgptorg/promptbook/discussions/172
|
|
8
11
|
*/
|
|
9
12
|
export type AbstractFormfactorDefinition = {
|
|
10
13
|
/**
|
|
@@ -32,3 +35,6 @@ export type AbstractFormfactorDefinition = {
|
|
|
32
35
|
*/
|
|
33
36
|
readonly pipelineInterface: PipelineInterface;
|
|
34
37
|
};
|
|
38
|
+
/**
|
|
39
|
+
* TODO: [🧠][🤓] How to pass optional parameters - for example summary in FORMFACTOR Translator
|
|
40
|
+
*/
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @@@
|
|
3
|
+
*
|
|
4
|
+
* @public exported from `@promptbook/core`
|
|
5
|
+
*/
|
|
6
|
+
export declare const ChatbotFormfactorDefinition: {
|
|
7
|
+
readonly name: "CHATBOT";
|
|
8
|
+
readonly aliasNames: readonly ["CHAT"];
|
|
9
|
+
readonly description: "@@@";
|
|
10
|
+
readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/174";
|
|
11
|
+
readonly pipelineInterface: {
|
|
12
|
+
readonly inputParameters: readonly [{
|
|
13
|
+
readonly name: "previousTitle";
|
|
14
|
+
readonly description: "Previous title of the conversation";
|
|
15
|
+
readonly isInput: true;
|
|
16
|
+
readonly isOutput: false;
|
|
17
|
+
}, {
|
|
18
|
+
readonly name: "previousConversationSummary";
|
|
19
|
+
readonly description: "Previous conversation summary";
|
|
20
|
+
readonly isInput: true;
|
|
21
|
+
readonly isOutput: false;
|
|
22
|
+
}, {
|
|
23
|
+
readonly name: "userMessage";
|
|
24
|
+
readonly description: "User message";
|
|
25
|
+
readonly isInput: true;
|
|
26
|
+
readonly isOutput: false;
|
|
27
|
+
}];
|
|
28
|
+
readonly outputParameters: readonly [{
|
|
29
|
+
readonly name: "title";
|
|
30
|
+
readonly description: "Title of the conversation";
|
|
31
|
+
readonly isInput: false;
|
|
32
|
+
readonly isOutput: true;
|
|
33
|
+
}, {
|
|
34
|
+
readonly name: "conversationSummary";
|
|
35
|
+
readonly description: "Summary of the conversation";
|
|
36
|
+
readonly isInput: false;
|
|
37
|
+
readonly isOutput: true;
|
|
38
|
+
}, {
|
|
39
|
+
readonly name: "chatbotResponse";
|
|
40
|
+
readonly description: "Chatbot response";
|
|
41
|
+
readonly isInput: false;
|
|
42
|
+
readonly isOutput: true;
|
|
43
|
+
}];
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generator is form of app that @@@
|
|
3
|
+
*
|
|
4
|
+
* @public exported from `@promptbook/core`
|
|
5
|
+
*/
|
|
6
|
+
export declare const GeneratorFormfactorDefinition: {
|
|
7
|
+
readonly name: "GENERATOR";
|
|
8
|
+
readonly description: "@@@";
|
|
9
|
+
readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/184";
|
|
10
|
+
readonly pipelineInterface: {
|
|
11
|
+
readonly inputParameters: readonly [];
|
|
12
|
+
readonly outputParameters: readonly [];
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
export declare const GenericFormfactorDefinition: {
|
|
7
7
|
readonly name: "GENERIC";
|
|
8
8
|
readonly description: "@@@";
|
|
9
|
-
readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions
|
|
9
|
+
readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/173";
|
|
10
10
|
readonly pipelineInterface: {
|
|
11
|
-
readonly
|
|
12
|
-
readonly
|
|
11
|
+
readonly inputParameters: readonly [];
|
|
12
|
+
readonly outputParameters: readonly [];
|
|
13
13
|
};
|
|
14
14
|
};
|
|
@@ -6,34 +6,107 @@
|
|
|
6
6
|
export declare const FORMFACTOR_DEFINITIONS: readonly [{
|
|
7
7
|
readonly name: "GENERIC";
|
|
8
8
|
readonly description: "@@@";
|
|
9
|
-
readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions
|
|
9
|
+
readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/173";
|
|
10
10
|
readonly pipelineInterface: {
|
|
11
|
-
readonly
|
|
12
|
-
readonly
|
|
11
|
+
readonly inputParameters: readonly [];
|
|
12
|
+
readonly outputParameters: readonly [];
|
|
13
13
|
};
|
|
14
14
|
}, {
|
|
15
15
|
readonly name: "CHATBOT";
|
|
16
16
|
readonly aliasNames: readonly ["CHAT"];
|
|
17
17
|
readonly description: "@@@";
|
|
18
|
-
readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions
|
|
18
|
+
readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/174";
|
|
19
19
|
readonly pipelineInterface: {
|
|
20
|
-
readonly
|
|
21
|
-
|
|
20
|
+
readonly inputParameters: readonly [{
|
|
21
|
+
readonly name: "previousTitle";
|
|
22
|
+
readonly description: "Previous title of the conversation"; /**
|
|
23
|
+
* All available formfactor definitions
|
|
24
|
+
*
|
|
25
|
+
* @public exported from `@promptbook/core`
|
|
26
|
+
*/
|
|
27
|
+
readonly isInput: true;
|
|
28
|
+
readonly isOutput: false;
|
|
29
|
+
}, {
|
|
30
|
+
readonly name: "previousConversationSummary";
|
|
31
|
+
readonly description: "Previous conversation summary";
|
|
32
|
+
readonly isInput: true;
|
|
33
|
+
readonly isOutput: false;
|
|
34
|
+
}, {
|
|
35
|
+
readonly name: "userMessage";
|
|
36
|
+
readonly description: "User message";
|
|
37
|
+
readonly isInput: true;
|
|
38
|
+
readonly isOutput: false;
|
|
39
|
+
}];
|
|
40
|
+
readonly outputParameters: readonly [{
|
|
41
|
+
readonly name: "title";
|
|
42
|
+
readonly description: "Title of the conversation";
|
|
43
|
+
readonly isInput: false;
|
|
44
|
+
readonly isOutput: true;
|
|
45
|
+
}, {
|
|
46
|
+
readonly name: "conversationSummary";
|
|
47
|
+
readonly description: "Summary of the conversation";
|
|
48
|
+
readonly isInput: false;
|
|
49
|
+
readonly isOutput: true;
|
|
50
|
+
}, {
|
|
51
|
+
readonly name: "chatbotResponse";
|
|
52
|
+
readonly description: "Chatbot response";
|
|
53
|
+
readonly isInput: false;
|
|
54
|
+
readonly isOutput: true;
|
|
55
|
+
}];
|
|
22
56
|
};
|
|
23
57
|
}, {
|
|
24
58
|
readonly name: "TRANSLATOR";
|
|
25
59
|
readonly description: "@@@";
|
|
26
|
-
readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions
|
|
60
|
+
readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/175";
|
|
27
61
|
readonly pipelineInterface: {
|
|
28
|
-
readonly
|
|
29
|
-
|
|
62
|
+
readonly inputParameters: readonly [{
|
|
63
|
+
readonly name: "inputMessage";
|
|
64
|
+
readonly description: "Input message to be translated";
|
|
65
|
+
readonly isInput: true;
|
|
66
|
+
readonly isOutput: false;
|
|
67
|
+
}];
|
|
68
|
+
readonly outputParameters: readonly [{
|
|
69
|
+
readonly name: "outputMessage";
|
|
70
|
+
readonly description: "Translated output message";
|
|
71
|
+
readonly isInput: false;
|
|
72
|
+
readonly isOutput: true;
|
|
73
|
+
}];
|
|
30
74
|
};
|
|
31
75
|
}, {
|
|
32
76
|
readonly name: "SHEETS";
|
|
33
77
|
readonly description: "@@@";
|
|
34
|
-
readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions
|
|
78
|
+
readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/176";
|
|
35
79
|
readonly pipelineInterface: {
|
|
36
|
-
readonly
|
|
37
|
-
|
|
80
|
+
readonly inputParameters: readonly [{
|
|
81
|
+
readonly name: "inputSheet";
|
|
82
|
+
readonly description: "Input sheet to be processed as csv";
|
|
83
|
+
readonly isInput: true;
|
|
84
|
+
readonly isOutput: false;
|
|
85
|
+
}];
|
|
86
|
+
readonly outputParameters: readonly [{
|
|
87
|
+
readonly name: "outputSheet";
|
|
88
|
+
readonly description: "Output sheet as csv";
|
|
89
|
+
readonly isInput: false;
|
|
90
|
+
readonly isOutput: true;
|
|
91
|
+
}];
|
|
92
|
+
};
|
|
93
|
+
}, {
|
|
94
|
+
readonly name: "EXPERIMENTAL_MATCHER";
|
|
95
|
+
readonly description: "@@@";
|
|
96
|
+
readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/177";
|
|
97
|
+
readonly pipelineInterface: {
|
|
98
|
+
readonly inputParameters: readonly [];
|
|
99
|
+
readonly outputParameters: readonly [];
|
|
100
|
+
};
|
|
101
|
+
}, {
|
|
102
|
+
readonly name: "GENERATOR";
|
|
103
|
+
readonly description: "@@@";
|
|
104
|
+
readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/184";
|
|
105
|
+
readonly pipelineInterface: {
|
|
106
|
+
readonly inputParameters: readonly [];
|
|
107
|
+
readonly outputParameters: readonly [];
|
|
38
108
|
};
|
|
39
109
|
}];
|
|
110
|
+
/**
|
|
111
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
112
|
+
*/
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Matcher is form of app that @@@
|
|
3
|
+
*
|
|
4
|
+
* @public exported from `@promptbook/core`
|
|
5
|
+
*/
|
|
6
|
+
export declare const MatcherFormfactorDefinition: {
|
|
7
|
+
readonly name: "EXPERIMENTAL_MATCHER";
|
|
8
|
+
readonly description: "@@@";
|
|
9
|
+
readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/177";
|
|
10
|
+
readonly pipelineInterface: {
|
|
11
|
+
readonly inputParameters: readonly [];
|
|
12
|
+
readonly outputParameters: readonly [];
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -6,9 +6,19 @@
|
|
|
6
6
|
export declare const SheetsFormfactorDefinition: {
|
|
7
7
|
readonly name: "SHEETS";
|
|
8
8
|
readonly description: "@@@";
|
|
9
|
-
readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions
|
|
9
|
+
readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/176";
|
|
10
10
|
readonly pipelineInterface: {
|
|
11
|
-
readonly
|
|
12
|
-
|
|
11
|
+
readonly inputParameters: readonly [{
|
|
12
|
+
readonly name: "inputSheet";
|
|
13
|
+
readonly description: "Input sheet to be processed as csv";
|
|
14
|
+
readonly isInput: true;
|
|
15
|
+
readonly isOutput: false;
|
|
16
|
+
}];
|
|
17
|
+
readonly outputParameters: readonly [{
|
|
18
|
+
readonly name: "outputSheet";
|
|
19
|
+
readonly description: "Output sheet as csv";
|
|
20
|
+
readonly isInput: false;
|
|
21
|
+
readonly isOutput: true;
|
|
22
|
+
}];
|
|
13
23
|
};
|
|
14
24
|
};
|
|
@@ -6,9 +6,19 @@
|
|
|
6
6
|
export declare const TranslatorFormfactorDefinition: {
|
|
7
7
|
readonly name: "TRANSLATOR";
|
|
8
8
|
readonly description: "@@@";
|
|
9
|
-
readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions
|
|
9
|
+
readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/175";
|
|
10
10
|
readonly pipelineInterface: {
|
|
11
|
-
readonly
|
|
12
|
-
|
|
11
|
+
readonly inputParameters: readonly [{
|
|
12
|
+
readonly name: "inputMessage";
|
|
13
|
+
readonly description: "Input message to be translated";
|
|
14
|
+
readonly isInput: true;
|
|
15
|
+
readonly isOutput: false;
|
|
16
|
+
}];
|
|
17
|
+
readonly outputParameters: readonly [{
|
|
18
|
+
readonly name: "outputMessage";
|
|
19
|
+
readonly description: "Translated output message";
|
|
20
|
+
readonly isInput: false;
|
|
21
|
+
readonly isOutput: true;
|
|
22
|
+
}];
|
|
13
23
|
};
|
|
14
24
|
};
|
|
@@ -20,4 +20,5 @@ export declare const ANTHROPIC_CLAUDE_MODELS: ReadonlyArray<AvailableModel & {
|
|
|
20
20
|
* TODO: [🧠] Some mechanism to propagate unsureness
|
|
21
21
|
* TODO: [🧠][👮♀️] Put here more info like description, isVision, trainingDateCutoff, languages, strengths ( Top-level performance, intelligence, fluency, and understanding), contextWindow,...
|
|
22
22
|
* TODO: [🎰] Some mechanism to auto-update available models
|
|
23
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
23
24
|
*/
|
|
@@ -10,4 +10,5 @@ import type { Registration } from '../../utils/$Register';
|
|
|
10
10
|
export declare const _AnthropicClaudeRegistration: Registration;
|
|
11
11
|
/**
|
|
12
12
|
* TODO: [🎶] Naming "constructor" vs "creator" vs "factory"
|
|
13
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
13
14
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Expectations } from '../../
|
|
1
|
+
import type { Expectations } from '../../pipeline/PipelineJson/Expectations';
|
|
2
2
|
import type { string_postprocessing_function_name } from '../../types/typeAliases';
|
|
3
3
|
/**
|
|
4
4
|
* Gets the expectations and creates a fake text that meets the expectations
|
|
@@ -27,4 +27,5 @@ export declare const OPENAI_MODELS: ReadonlyArray<AvailableModel & {
|
|
|
27
27
|
* TODO: [🍓] Make better
|
|
28
28
|
* TODO: Change model titles to human eg: "gpt-4-turbo-2024-04-09" -> "GPT-4 Turbo (2024-04-09)"
|
|
29
29
|
* TODO: [🚸] Not all models are compatible with JSON mode, add this information here and use it
|
|
30
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
30
31
|
*/
|
|
@@ -17,3 +17,6 @@ export declare const _OpenAiMetadataRegistration: Registration;
|
|
|
17
17
|
* @public exported from `@promptbook/cli`
|
|
18
18
|
*/
|
|
19
19
|
export declare const _OpenAiAssistantMetadataRegistration: Registration;
|
|
20
|
+
/**
|
|
21
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
22
|
+
*/
|
|
@@ -19,4 +19,5 @@ export declare const _OpenAiRegistration: Registration;
|
|
|
19
19
|
export declare const _OpenAiAssistantRegistration: Registration;
|
|
20
20
|
/**
|
|
21
21
|
* TODO: [🎶] Naming "constructor" vs "creator" vs "factory"
|
|
22
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
22
23
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ExecutionTools } from '../execution/ExecutionTools';
|
|
2
|
+
import type { PersonaPreparedJson } from '../pipeline/PipelineJson/PersonaJson';
|
|
2
3
|
import type { PrepareAndScrapeOptions } from '../prepare/PrepareAndScrapeOptions';
|
|
3
|
-
import type { PersonaPreparedJson } from '../types/PipelineJson/PersonaJson';
|
|
4
4
|
import type { string_persona_description } from '../types/typeAliases';
|
|
5
5
|
/**
|
|
6
6
|
* Prepares the persona for the pipeline
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { InputParameterJson } from '../PipelineJson/ParameterJson';
|
|
2
|
+
import type { OutputParameterJson } from '../PipelineJson/ParameterJson';
|
|
3
|
+
/**
|
|
4
|
+
* @@@
|
|
5
|
+
*
|
|
6
|
+
* Note: [🚉] This is fully serializable as JSON
|
|
7
|
+
* @see https://github.com/webgptorg/promptbook/discussions/171
|
|
8
|
+
*/
|
|
9
|
+
export type PipelineInterface = {
|
|
10
|
+
/**
|
|
11
|
+
* @@@
|
|
12
|
+
*
|
|
13
|
+
* Note: Sorted alphabetically
|
|
14
|
+
*/
|
|
15
|
+
readonly inputParameters: ReadonlyArray<InputParameterJson>;
|
|
16
|
+
/**
|
|
17
|
+
* @@@
|
|
18
|
+
*
|
|
19
|
+
* Note: Sorted alphabetically
|
|
20
|
+
*/
|
|
21
|
+
readonly outputParameters: ReadonlyArray<OutputParameterJson>;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* TODO: [🧠][🤓] How to pass optional parameters - for example summary in FORMFACTOR Translator
|
|
25
|
+
* TODO: [🧠] Better name than `PipelineInterface` to avoid confusion with typescript `interface`
|
|
26
|
+
*/
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @@@
|
|
3
|
+
*
|
|
4
|
+
* @see https://github.com/webgptorg/promptbook/discussions/171
|
|
5
|
+
*
|
|
6
|
+
* @public exported from `@promptbook/core`
|
|
7
|
+
*/
|
|
8
|
+
export declare const GENERIC_PIPELINE_INTERFACE: {
|
|
9
|
+
readonly inputParameters: readonly [];
|
|
10
|
+
readonly outputParameters: readonly [];
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
14
|
+
*/
|
package/esm/typings/src/pipeline/{pipeline-interface → PipelineInterface}/getPipelineInterface.d.ts
RENAMED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import type { PipelineJson } from '
|
|
1
|
+
import type { PipelineJson } from '../PipelineJson/PipelineJson';
|
|
2
2
|
import type { PipelineInterface } from './PipelineInterface';
|
|
3
3
|
/**
|
|
4
4
|
* @@@
|
|
5
5
|
*
|
|
6
|
+
* @see https://github.com/webgptorg/promptbook/discussions/171
|
|
7
|
+
*
|
|
6
8
|
* @public exported from `@promptbook/core`
|
|
7
9
|
*/
|
|
8
10
|
export declare function getPipelineInterface(pipeline: PipelineJson): PipelineInterface;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import type { PipelineJson } from '
|
|
1
|
+
import type { PipelineJson } from '../PipelineJson/PipelineJson';
|
|
2
2
|
import type { PipelineInterface } from './PipelineInterface';
|
|
3
3
|
/**
|
|
4
4
|
* @@@
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/webgptorg/promptbook/discussions/171
|
|
5
7
|
*/
|
|
6
8
|
export type IsPipelineImplementingInterfaceOptions = {
|
|
7
9
|
/**
|
|
@@ -16,6 +18,8 @@ export type IsPipelineImplementingInterfaceOptions = {
|
|
|
16
18
|
/**
|
|
17
19
|
* @@@
|
|
18
20
|
*
|
|
21
|
+
* @see https://github.com/webgptorg/promptbook/discussions/171
|
|
22
|
+
*
|
|
19
23
|
* @public exported from `@promptbook/core`
|
|
20
24
|
*/
|
|
21
25
|
export declare function isPipelineImplementingInterface(options: IsPipelineImplementingInterfaceOptions): boolean;
|
|
@@ -2,6 +2,8 @@ import type { PipelineInterface } from './PipelineInterface';
|
|
|
2
2
|
/**
|
|
3
3
|
* @@@
|
|
4
4
|
*
|
|
5
|
+
* @see https://github.com/webgptorg/promptbook/discussions/171
|
|
6
|
+
*
|
|
5
7
|
* @public exported from `@promptbook/core`
|
|
6
8
|
*/
|
|
7
9
|
export declare function isPipelineInterfacesEqual(pipelineInterface1: PipelineInterface, pipelineInterface2: PipelineInterface): boolean;
|
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
import type { ForeachJson } from '../../commands/FOREACH/ForeachJson';
|
|
2
2
|
import type { FormatCommand } from '../../commands/FORMAT/FormatCommand';
|
|
3
|
-
import type {
|
|
4
|
-
import type { string_javascript } from '
|
|
5
|
-
import type { string_markdown } from '
|
|
6
|
-
import type { string_markdown_text } from '
|
|
7
|
-
import type { string_name } from '
|
|
8
|
-
import type { string_parameter_name } from '
|
|
9
|
-
import type { string_postprocessing_function_name } from '
|
|
10
|
-
import type { string_prompt } from '
|
|
11
|
-
import type { string_template } from '
|
|
3
|
+
import type { SectionType } from '../../types/SectionType';
|
|
4
|
+
import type { string_javascript } from '../../types/typeAliases';
|
|
5
|
+
import type { string_markdown } from '../../types/typeAliases';
|
|
6
|
+
import type { string_markdown_text } from '../../types/typeAliases';
|
|
7
|
+
import type { string_name } from '../../types/typeAliases';
|
|
8
|
+
import type { string_parameter_name } from '../../types/typeAliases';
|
|
9
|
+
import type { string_postprocessing_function_name } from '../../types/typeAliases';
|
|
10
|
+
import type { string_prompt } from '../../types/typeAliases';
|
|
11
|
+
import type { string_template } from '../../types/typeAliases';
|
|
12
12
|
import type { Expectations } from './Expectations';
|
|
13
13
|
/**
|
|
14
|
-
* Common properties of all
|
|
14
|
+
* Common properties of all tasks
|
|
15
15
|
*/
|
|
16
|
-
export type
|
|
16
|
+
export type CommonTaskJson = {
|
|
17
17
|
/**
|
|
18
|
-
* Name of the
|
|
18
|
+
* Name of the task
|
|
19
19
|
* - It must be unique across the pipeline
|
|
20
20
|
* - It should start uppercase and can contain letters and numbers
|
|
21
|
-
* - The pipelineUrl together with hash and name are used to identify the
|
|
21
|
+
* - The pipelineUrl together with hash and name are used to identify the task in the pipeline
|
|
22
22
|
*/
|
|
23
23
|
readonly name: string_name;
|
|
24
24
|
/**
|
|
25
|
-
* Title of the
|
|
25
|
+
* Title of the task
|
|
26
26
|
* It can use simple markdown formatting like **bold**, *italic*, [link](https://example.com), ... BUT not code blocks and structure
|
|
27
27
|
*/
|
|
28
28
|
readonly title: string;
|
|
29
29
|
/**
|
|
30
|
-
* Description of the
|
|
30
|
+
* Description of the task
|
|
31
31
|
* It can use multiple paragraphs of simple markdown formatting like **bold**, *italic*, [link](https://example.com), ... BUT not code blocks and structure
|
|
32
32
|
*/
|
|
33
33
|
readonly description?: string_markdown_text;
|
|
34
34
|
/**
|
|
35
|
-
* List of parameter names that are used in the
|
|
35
|
+
* List of parameter names that are used in the task and must be defined before the task is executed
|
|
36
36
|
*
|
|
37
37
|
* Note: Joker is one of the dependent parameters
|
|
38
38
|
*/
|
|
39
39
|
readonly dependentParameterNames: Array<string_parameter_name>;
|
|
40
40
|
/**
|
|
41
|
-
* If theese parameters meet the expectations requirements, they are used instead of executing this
|
|
41
|
+
* If theese parameters meet the expectations requirements, they are used instead of executing this task
|
|
42
42
|
*
|
|
43
43
|
* @see https://github.com/webgptorg/promptbook/discussions/66
|
|
44
44
|
*/
|
|
@@ -49,17 +49,17 @@ export type TemplateJsonCommon = {
|
|
|
49
49
|
readonly foreach?: ForeachJson;
|
|
50
50
|
/**
|
|
51
51
|
* Type of the execution
|
|
52
|
-
* This determines if the
|
|
52
|
+
* This determines if the task is send to LLM, user or some scripting evaluation
|
|
53
53
|
*/
|
|
54
|
-
readonly
|
|
54
|
+
readonly taskType: SectionType;
|
|
55
55
|
/**
|
|
56
|
-
* Content of the
|
|
56
|
+
* Content of the task with {placeholders} for parameters
|
|
57
57
|
*
|
|
58
58
|
* @@@ content vs preparedContent
|
|
59
59
|
*/
|
|
60
60
|
readonly content: (string_prompt | string_javascript | string_markdown) & string_template;
|
|
61
61
|
/**
|
|
62
|
-
* @@@ Content of the
|
|
62
|
+
* @@@ Content of the task with {placeholders} for parameters
|
|
63
63
|
*
|
|
64
64
|
* @@@ content vs preparedContent
|
|
65
65
|
*
|
|
@@ -67,7 +67,7 @@ export type TemplateJsonCommon = {
|
|
|
67
67
|
*/
|
|
68
68
|
readonly preparedContent?: (string_prompt | string_javascript | string_markdown) & string_template;
|
|
69
69
|
/**
|
|
70
|
-
* List of postprocessing steps that are executed after the
|
|
70
|
+
* List of postprocessing steps that are executed after the task
|
|
71
71
|
*
|
|
72
72
|
* @see https://github.com/webgptorg/promptbook/discussions/31
|
|
73
73
|
*/
|
|
@@ -90,11 +90,11 @@ export type TemplateJsonCommon = {
|
|
|
90
90
|
*/
|
|
91
91
|
readonly format?: FormatCommand['format'];
|
|
92
92
|
/**
|
|
93
|
-
* Name of the parameter that is the result of the
|
|
93
|
+
* Name of the parameter that is the result of the task
|
|
94
94
|
*/
|
|
95
95
|
readonly resultingParameterName: string_name;
|
|
96
96
|
};
|
|
97
97
|
/**
|
|
98
98
|
* TODO: use one helper type> (string_prompt | string_javascript | string_markdown) & string_template
|
|
99
|
-
* TODO: [♈] Probbably move expectations from
|
|
99
|
+
* TODO: [♈] Probbably move expectations from tasks to parameters
|
|
100
100
|
*/
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CommonTaskJson } from './CommonTaskJson';
|
|
2
|
+
/**
|
|
3
|
+
* Task for prompt to user
|
|
4
|
+
*
|
|
5
|
+
* Note: [🚉] This is fully serializable as JSON
|
|
6
|
+
* @see https://github.com/webgptorg/promptbook/discussions/76
|
|
7
|
+
*/
|
|
8
|
+
export type DialogTaskJson = CommonTaskJson & {
|
|
9
|
+
readonly taskType: 'DIALOG_TASK';
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* TODO: [🍙] Make some standard order of json properties
|
|
13
|
+
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TupleToUnion } from 'type-fest';
|
|
2
|
-
import type { number_integer } from '
|
|
3
|
-
import type { number_positive } from '
|
|
2
|
+
import type { number_integer } from '../../types/typeAliases';
|
|
3
|
+
import type { number_positive } from '../../types/typeAliases';
|
|
4
4
|
/**
|
|
5
5
|
* Expect this amount of each unit in the answer
|
|
6
6
|
*
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { EmbeddingVector } from '../../execution/EmbeddingVector';
|
|
2
|
+
import type { number_id } from '../../types/typeAliases';
|
|
3
|
+
import type { number_linecol_number } from '../../types/typeAliases';
|
|
4
|
+
import type { string_markdown } from '../../types/typeAliases';
|
|
5
|
+
import type { string_markdown_text } from '../../types/typeAliases';
|
|
6
|
+
import type { string_model_name } from '../../types/typeAliases';
|
|
7
|
+
import type { string_name } from '../../types/typeAliases';
|
|
2
8
|
import type { string_keyword } from '../../utils/normalization/IKeywords';
|
|
3
|
-
import type { number_id } from '../typeAliases';
|
|
4
|
-
import type { number_linecol_number } from '../typeAliases';
|
|
5
|
-
import type { string_markdown } from '../typeAliases';
|
|
6
|
-
import type { string_markdown_text } from '../typeAliases';
|
|
7
|
-
import type { string_model_name } from '../typeAliases';
|
|
8
|
-
import type { string_name } from '../typeAliases';
|
|
9
9
|
/**
|
|
10
10
|
* Defines one piece of knowledge in the pipeline
|
|
11
11
|
*
|
|
@@ -69,4 +69,5 @@ export type KnowledgePiecePreparedJson = {
|
|
|
69
69
|
};
|
|
70
70
|
/**
|
|
71
71
|
* TODO: [🍙] Make some standard order of json properties
|
|
72
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
72
73
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { number_id } from '
|
|
2
|
-
import type { string_knowledge_source_content } from '
|
|
3
|
-
import type { string_name } from '
|
|
1
|
+
import type { number_id } from '../../types/typeAliases';
|
|
2
|
+
import type { string_knowledge_source_content } from '../../types/typeAliases';
|
|
3
|
+
import type { string_name } from '../../types/typeAliases';
|
|
4
4
|
/**
|
|
5
5
|
* Defines one source of knowledge in the pipeline
|
|
6
6
|
* For example, a source of information, a fact, a quote, a definition, website, etc.
|