@promptbook/core 0.68.0-1 → 0.68.0-3
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 +2 -2
- package/esm/index.es.js +15 -15
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/commands/EXPECT/ExpectCommand.d.ts +1 -1
- package/esm/typings/src/commands/_common/types/Command.d.ts +1 -1
- package/esm/typings/src/conversion/prettify/renderPipelineMermaidOptions.d.ts +1 -1
- package/esm/typings/src/conversion/utils/extractParameterNamesFromTemplate.d.ts +1 -1
- package/esm/typings/src/conversion/utils/renameParameter.d.ts +2 -2
- package/esm/typings/src/conversion/validation/_importPipeline.d.ts +1 -1
- package/esm/typings/src/prepare/prepareTemplates.d.ts +1 -1
- package/esm/typings/src/types/PipelineJson/PipelineJson.d.ts +3 -3
- package/esm/typings/src/types/PipelineJson/TemplateJsonCommon.d.ts +9 -9
- package/esm/typings/src/types/PipelineString.d.ts +1 -1
- package/esm/typings/src/types/execution-report/ExecutionReportJson.d.ts +1 -1
- package/package.json +1 -1
- package/umd/index.umd.js +15 -15
- package/umd/index.umd.js.map +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ExpectationAmount } from '../../types/PipelineJson/Expectations';
|
|
2
2
|
import type { ExpectationUnit } from '../../types/PipelineJson/Expectations';
|
|
3
3
|
/**
|
|
4
|
-
* Expect amount command describes the desired output of the
|
|
4
|
+
* Expect amount command describes the desired output of the template (after post-processing)
|
|
5
5
|
* It can set limits for the maximum/minimum length of the output, measured in characters, words, sentences, paragraphs,...
|
|
6
6
|
*
|
|
7
7
|
* Note: LLMs work with tokens, not characters, but in Promptbooks we want to use some human-recognisable and cross-model interoperable units.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { COMMANDS } from '../../index';
|
|
2
2
|
/**
|
|
3
|
-
* Command is one piece of the
|
|
3
|
+
* Command is one piece of the template which adds some logic to the template or the whole pipeline.
|
|
4
4
|
* It is parsed from the markdown from ul/ol items - one command per one item.
|
|
5
5
|
*/
|
|
6
6
|
export type Command = ReturnType<typeof COMMANDS[number]['parse']>;
|
|
@@ -6,7 +6,7 @@ import type { string_href } from '../../types/typeAliases';
|
|
|
6
6
|
*/
|
|
7
7
|
export type renderPipelineMermaidOptions = {
|
|
8
8
|
/**
|
|
9
|
-
* Callback for creating from
|
|
9
|
+
* Callback for creating from template graph node
|
|
10
10
|
*/
|
|
11
11
|
linkTemplate?(template: TemplateJson): {
|
|
12
12
|
href: string_href;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { TemplateJson } from '../../types/PipelineJson/TemplateJson';
|
|
2
2
|
import type { string_parameter_name } from '../../types/typeAliases';
|
|
3
3
|
/**
|
|
4
|
-
* Parses the
|
|
4
|
+
* Parses the template and returns the set of all used parameters
|
|
5
5
|
*
|
|
6
6
|
* @param template the template with used parameters
|
|
7
7
|
* @returns the set of parameter names
|
|
@@ -16,8 +16,8 @@ type RenameParameterOptions = {
|
|
|
16
16
|
readonly newParameterName: string_name;
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
|
-
* Function renameParameter will find all usable parameters for given
|
|
20
|
-
* In other words, it will find all parameters that are not used in the
|
|
19
|
+
* Function `renameParameter` will find all usable parameters for given template
|
|
20
|
+
* In other words, it will find all parameters that are not used in the template itseld and all its dependencies
|
|
21
21
|
*
|
|
22
22
|
* @throws {PipelineLogicError} If the new parameter name is already used in the pipeline
|
|
23
23
|
* @public exported from `@promptbook/utils`
|
|
@@ -7,7 +7,7 @@ import type { string_json } from '../../types/typeAliases';
|
|
|
7
7
|
* Note: Using here custom import to work in jest tests
|
|
8
8
|
* Note: Using sync version is 💩 in the production code, but it's ok here in tests
|
|
9
9
|
*
|
|
10
|
-
* @param path - The path to the file relative to samples/
|
|
10
|
+
* @param path - The path to the file relative to samples/pipelines directory
|
|
11
11
|
* @private internal function of tests
|
|
12
12
|
*/
|
|
13
13
|
export declare function importPipelineWithoutPreparation(path: `${string}.ptbk.md`): PipelineString;
|
|
@@ -9,7 +9,7 @@ type PrepareTemplateInput = Pick<PipelineJson, 'templates' | 'parameters'> & {
|
|
|
9
9
|
};
|
|
10
10
|
type PreparedTemplates = {
|
|
11
11
|
/**
|
|
12
|
-
* @@@ Sequence of
|
|
12
|
+
* @@@ Sequence of templates that are chained together to form a pipeline
|
|
13
13
|
*/
|
|
14
14
|
readonly templatesPrepared: Array<TemplateJson>;
|
|
15
15
|
};
|
|
@@ -13,7 +13,7 @@ import type { PreparationJson } from './PreparationJson';
|
|
|
13
13
|
import type { TemplateJson } from './TemplateJson';
|
|
14
14
|
/**
|
|
15
15
|
* Promptbook is the **core concept of this package**.
|
|
16
|
-
* It represents a series of
|
|
16
|
+
* It represents a series of templates chained together to form a pipeline / one big template with input and result parameters.
|
|
17
17
|
*
|
|
18
18
|
* Note: [🚉] This is fully serializable as JSON
|
|
19
19
|
*
|
|
@@ -27,7 +27,7 @@ export type PipelineJson = {
|
|
|
27
27
|
* Note: It must use HTTPs URL
|
|
28
28
|
* Tip: You can do versioning in the URL
|
|
29
29
|
* For example: https://promptbook.studio/webgpt/write-website-content-cs.ptbk.md@1.0.0
|
|
30
|
-
* Warning: Do not hash part of the URL, hash part is used for identification of the
|
|
30
|
+
* Warning: Do not hash part of the URL, hash part is used for identification of the template in the pipeline
|
|
31
31
|
*/
|
|
32
32
|
readonly pipelineUrl?: string_pipeline_url;
|
|
33
33
|
/**
|
|
@@ -57,7 +57,7 @@ export type PipelineJson = {
|
|
|
57
57
|
*/
|
|
58
58
|
readonly defaultModelRequirements?: Partial<ModelRequirements>;
|
|
59
59
|
/**
|
|
60
|
-
* Sequence of
|
|
60
|
+
* Sequence of templates that are chained together to form a pipeline
|
|
61
61
|
*/
|
|
62
62
|
readonly templates: Array<TemplateJson>;
|
|
63
63
|
/**
|
|
@@ -10,41 +10,41 @@ import type { string_prompt } from '../typeAliases';
|
|
|
10
10
|
import type { string_template } from '../typeAliases';
|
|
11
11
|
import type { Expectations } from './Expectations';
|
|
12
12
|
/**
|
|
13
|
-
* Common properties of all
|
|
13
|
+
* Common properties of all templates
|
|
14
14
|
*/
|
|
15
15
|
export interface TemplateJsonCommon {
|
|
16
16
|
/**
|
|
17
17
|
* Name of the template
|
|
18
18
|
* - It must be unique across the pipeline
|
|
19
19
|
* - It should start uppercase and can contain letters and numbers
|
|
20
|
-
* - The pipelineUrl together with hash and name are used to identify the
|
|
20
|
+
* - The pipelineUrl together with hash and name are used to identify the template in the pipeline
|
|
21
21
|
*/
|
|
22
22
|
readonly name: string_name;
|
|
23
23
|
/**
|
|
24
|
-
* Title of the
|
|
24
|
+
* Title of the template
|
|
25
25
|
* It can use simple markdown formatting like **bold**, *italic*, [link](https://example.com), ... BUT not code blocks and structure
|
|
26
26
|
*/
|
|
27
27
|
readonly title: string;
|
|
28
28
|
/**
|
|
29
|
-
* Description of the
|
|
29
|
+
* Description of the template
|
|
30
30
|
* It can use multiple paragraphs of simple markdown formatting like **bold**, *italic*, [link](https://example.com), ... BUT not code blocks and structure
|
|
31
31
|
*/
|
|
32
32
|
readonly description?: string_markdown_text;
|
|
33
33
|
/**
|
|
34
|
-
* List of parameter names that are used in the
|
|
34
|
+
* List of parameter names that are used in the template and must be defined before the template is executed
|
|
35
35
|
*
|
|
36
36
|
* Note: Joker is one of the dependent parameters
|
|
37
37
|
*/
|
|
38
38
|
readonly dependentParameterNames: Array<string_parameter_name>;
|
|
39
39
|
/**
|
|
40
|
-
* If theese parameters meet the expectations requirements, they are used instead of executing this
|
|
40
|
+
* If theese parameters meet the expectations requirements, they are used instead of executing this template
|
|
41
41
|
*
|
|
42
42
|
* @see https://github.com/webgptorg/promptbook/discussions/66
|
|
43
43
|
*/
|
|
44
44
|
readonly jokerParameterNames?: Array<string_parameter_name>;
|
|
45
45
|
/**
|
|
46
46
|
* Type of the execution
|
|
47
|
-
* This determines if the
|
|
47
|
+
* This determines if the template is send to LLM, user or some scripting evaluation
|
|
48
48
|
*/
|
|
49
49
|
readonly blockType: BlockType;
|
|
50
50
|
/**
|
|
@@ -62,7 +62,7 @@ export interface TemplateJsonCommon {
|
|
|
62
62
|
*/
|
|
63
63
|
readonly preparedContent?: (string_prompt | string_javascript | string_markdown) & string_template;
|
|
64
64
|
/**
|
|
65
|
-
* List of postprocessing steps that are executed after the
|
|
65
|
+
* List of postprocessing steps that are executed after the template
|
|
66
66
|
*
|
|
67
67
|
* @see https://github.com/webgptorg/promptbook/discussions/31
|
|
68
68
|
*/
|
|
@@ -85,7 +85,7 @@ export interface TemplateJsonCommon {
|
|
|
85
85
|
*/
|
|
86
86
|
readonly format?: FormatCommand['format'];
|
|
87
87
|
/**
|
|
88
|
-
* Name of the parameter that is the result of the
|
|
88
|
+
* Name of the parameter that is the result of the template
|
|
89
89
|
*/
|
|
90
90
|
readonly resultingParameterName: string_name;
|
|
91
91
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Promptbook is the **core concept of this package**.
|
|
3
|
-
* It represents a series of
|
|
3
|
+
* It represents a series of templates chained together to form a pipeline / one big template with input and result parameters.
|
|
4
4
|
*
|
|
5
5
|
* @see @@@ https://github.com/webgptorg/promptbook#promptbook
|
|
6
6
|
*/
|
|
@@ -35,7 +35,7 @@ export type ExecutionReportJson = {
|
|
|
35
35
|
*/
|
|
36
36
|
readonly description?: string_markdown_text;
|
|
37
37
|
/**
|
|
38
|
-
* Sequence of
|
|
38
|
+
* Sequence of templates in order which were executed
|
|
39
39
|
*/
|
|
40
40
|
readonly promptExecutions: Array<ExecutionPromptReportJson>;
|
|
41
41
|
};
|
package/package.json
CHANGED
package/umd/index.umd.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
/**
|
|
17
17
|
* The version of the Promptbook library
|
|
18
18
|
*/
|
|
19
|
-
var PROMPTBOOK_VERSION = '0.68.0-
|
|
19
|
+
var PROMPTBOOK_VERSION = '0.68.0-2';
|
|
20
20
|
// TODO: !!!! List here all the versions and annotate + put into script
|
|
21
21
|
|
|
22
22
|
/*! *****************************************************************************
|
|
@@ -1011,7 +1011,7 @@
|
|
|
1011
1011
|
// Note: Testing that parameter is either input or result of some template
|
|
1012
1012
|
if (!parameter.isInput &&
|
|
1013
1013
|
!pipeline.templates.some(function (template) { return template.resultingParameterName === parameter.name; })) {
|
|
1014
|
-
throw new PipelineLogicError(spaceTrim.spaceTrim(function (block) { return "\n Parameter {".concat(parameter.name, "} is declared but not defined\n\n You can do one of these:\n
|
|
1014
|
+
throw new PipelineLogicError(spaceTrim.spaceTrim(function (block) { return "\n Parameter {".concat(parameter.name, "} is declared but not defined\n\n You can do one of these:\n 1) Remove declaration of {").concat(parameter.name, "}\n 2) Add template that results in -> {").concat(parameter.name, "}\n\n ").concat(block(pipelineIdentification), "\n "); }));
|
|
1015
1015
|
}
|
|
1016
1016
|
};
|
|
1017
1017
|
try {
|
|
@@ -1794,7 +1794,7 @@
|
|
|
1794
1794
|
});
|
|
1795
1795
|
}
|
|
1796
1796
|
|
|
1797
|
-
var PipelineCollection = [{title:"Prepare Knowledge from Markdown",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-from-markdown.ptbk.md",promptbookVersion:"0.68.0-
|
|
1797
|
+
var PipelineCollection = [{title:"Prepare Knowledge from Markdown",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-from-markdown.ptbk.md",promptbookVersion:"0.68.0-2",parameters:[{name:"knowledgeContent",description:"Markdown document content",isInput:true,isOutput:false},{name:"knowledgePieces",description:"The knowledge JSON object",isInput:false,isOutput:true}],templates:[{blockType:"PROMPT_TEMPLATE",name:"knowledge",title:"Knowledge",content:"You are experienced data researcher, extract the important knowledge from the document.\n\n# Rules\n\n- Make pieces of information concise, clear, and easy to understand\n- One piece of information should be approximately 1 paragraph\n- Divide the paragraphs by markdown horizontal lines ---\n- Omit irrelevant information\n- Group redundant information\n- Write just extracted information, nothing else\n\n# The document\n\nTake information from this document:\n\n> {knowledgeContent}",resultingParameterName:"knowledgePieces",dependentParameterNames:["knowledgeContent"]}],knowledgeSources:[],knowledgePieces:[],personas:[],preparations:[],sourceFile:"./promptbook-collection/prepare-knowledge-from-markdown.ptbk.md"},{title:"Prepare Keywords",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-keywords.ptbk.md",promptbookVersion:"0.68.0-2",parameters:[{name:"knowledgePieceContent",description:"The content",isInput:true,isOutput:false},{name:"keywords",description:"Keywords separated by comma",isInput:false,isOutput:true}],templates:[{blockType:"PROMPT_TEMPLATE",name:"knowledge",title:"Knowledge",content:"You are experienced data researcher, detect the important keywords in the document.\n\n# Rules\n\n- Write just keywords separated by comma\n\n# The document\n\nTake information from this document:\n\n> {knowledgePieceContent}",resultingParameterName:"keywords",dependentParameterNames:["knowledgePieceContent"]}],knowledgeSources:[],knowledgePieces:[],personas:[],preparations:[],sourceFile:"./promptbook-collection/prepare-knowledge-keywords.ptbk.md"},{title:"Prepare Title",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-title.ptbk.md",promptbookVersion:"0.68.0-2",parameters:[{name:"knowledgePieceContent",description:"The content",isInput:true,isOutput:false},{name:"title",description:"The title of the document",isInput:false,isOutput:true}],templates:[{blockType:"PROMPT_TEMPLATE",name:"knowledge",title:"Knowledge",content:"You are experienced content creator, write best title for the document.\n\n# Rules\n\n- Write just title, nothing else\n- Title should be concise and clear\n- Write maximum 5 words for the title\n\n# The document\n\n> {knowledgePieceContent}",resultingParameterName:"title",expectations:{words:{min:1,max:8}},dependentParameterNames:["knowledgePieceContent"]}],knowledgeSources:[],knowledgePieces:[],personas:[],preparations:[],sourceFile:"./promptbook-collection/prepare-knowledge-title.ptbk.md"},{title:"Prepare Keywords",pipelineUrl:"https://promptbook.studio/promptbook/prepare-persona.ptbk.md",promptbookVersion:"0.68.0-2",parameters:[{name:"availableModelNames",description:"List of available model names separated by comma (,)",isInput:true,isOutput:false},{name:"personaDescription",description:"Description of the persona",isInput:true,isOutput:false},{name:"modelRequirements",description:"Specific requirements for the model",isInput:false,isOutput:true}],templates:[{blockType:"PROMPT_TEMPLATE",name:"make-model-requirements",title:"Make modelRequirements",content:"You are experienced AI engineer, you need to create virtual assistant.\nWrite\n\n## Sample\n\n```json\n{\n\"modelName\": \"gpt-4o\",\n\"systemMessage\": \"You are experienced AI engineer and helpfull assistant.\",\n\"temperature\": 0.7\n}\n```\n\n## Instructions\n\n- Your output format is JSON object\n- Write just the JSON object, no other text should be present\n- It contains the following keys:\n - `modelName`: The name of the model to use\n - `systemMessage`: The system message to provide context to the model\n - `temperature`: The sampling temperature to use\n\n### Key `modelName`\n\nPick from the following models:\n\n- {availableModelNames}\n\n### Key `systemMessage`\n\nThe system message is used to communicate instructions or provide context to the model at the beginning of a conversation. It is displayed in a different format compared to user messages, helping the model understand its role in the conversation. The system message typically guides the model's behavior, sets the tone, or specifies desired output from the model. By utilizing the system message effectively, users can steer the model towards generating more accurate and relevant responses.\n\nFor example:\n\n> You are an experienced AI engineer and helpful assistant.\n\n> You are a friendly and knowledgeable chatbot.\n\n### Key `temperature`\n\nThe sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.\n\nYou can pick a value between 0 and 2. For example:\n\n- `0.1`: Low temperature, extremely conservative and deterministic\n- `0.5`: Medium temperature, balanced between conservative and creative\n- `1.0`: High temperature, creative and bit random\n- `1.5`: Very high temperature, extremely creative and often chaotic and unpredictable\n- `2.0`: Maximum temperature, completely random and unpredictable, for some extreme creative use cases\n\n# The assistant\n\nTake this description of the persona:\n\n> {personaDescription}",resultingParameterName:"modelRequirements",format:"JSON",dependentParameterNames:["availableModelNames","personaDescription"]}],knowledgeSources:[],knowledgePieces:[],personas:[],preparations:[],sourceFile:"./promptbook-collection/prepare-persona.ptbk.md"}];
|
|
1798
1798
|
|
|
1799
1799
|
var defaultDiacriticsRemovalMap = [
|
|
1800
1800
|
{
|
|
@@ -2372,7 +2372,7 @@
|
|
|
2372
2372
|
*/
|
|
2373
2373
|
|
|
2374
2374
|
/**
|
|
2375
|
-
* Parses the
|
|
2375
|
+
* Parses the template and returns the set of all used parameters
|
|
2376
2376
|
*
|
|
2377
2377
|
* @param template the template with used parameters
|
|
2378
2378
|
* @returns the set of parameter names
|
|
@@ -3557,7 +3557,7 @@
|
|
|
3557
3557
|
throw new PipelineExecutionError(spaceTrim.spaceTrim(function (block) { return "\n No script execution tools are available\n\n ".concat(block(pipelineIdentification), "\n "); }));
|
|
3558
3558
|
}
|
|
3559
3559
|
if (!currentTemplate.contentLanguage) {
|
|
3560
|
-
throw new PipelineExecutionError(spaceTrim.spaceTrim(function (block) { return "\n Script language is not defined for
|
|
3560
|
+
throw new PipelineExecutionError(spaceTrim.spaceTrim(function (block) { return "\n Script language is not defined for SCRIPT TEMPLATE \"".concat(currentTemplate.name, "\"\n\n ").concat(block(pipelineIdentification), "\n "); }));
|
|
3561
3561
|
}
|
|
3562
3562
|
// TODO: DRY [1]
|
|
3563
3563
|
scriptPipelineExecutionErrors = [];
|
|
@@ -4884,7 +4884,7 @@
|
|
|
4884
4884
|
$applyToTemplateJson: function (command, $templateJson, $pipelineJson) {
|
|
4885
4885
|
// TODO: !!!!!! Test multiple / no block type
|
|
4886
4886
|
if ($templateJson.isBlockTypeSet === true) {
|
|
4887
|
-
throw new ParseError("Block type is already defined in the
|
|
4887
|
+
throw new ParseError(spaceTrim__default["default"]("\n Block type is already defined in the template.\n It can be defined only once.\n "));
|
|
4888
4888
|
}
|
|
4889
4889
|
$templateJson.isBlockTypeSet = true;
|
|
4890
4890
|
// TODO: !!!!!! Rearrange better - but at bottom and unwrap from function
|
|
@@ -5064,7 +5064,7 @@
|
|
|
5064
5064
|
/**
|
|
5065
5065
|
* Description of the FORMAT command
|
|
5066
5066
|
*/
|
|
5067
|
-
description: spaceTrim__default["default"]("\n Expect command describes the desired output of the
|
|
5067
|
+
description: spaceTrim__default["default"]("\n Expect command describes the desired output of the template (after post-processing)\n It can set limits for the maximum/minimum length of the output, measured in characters, words, sentences, paragraphs or some other shape of the output.\n "),
|
|
5068
5068
|
/**
|
|
5069
5069
|
* Link to discussion
|
|
5070
5070
|
*/
|
|
@@ -5299,7 +5299,7 @@
|
|
|
5299
5299
|
/**
|
|
5300
5300
|
* Description of the FORMAT command
|
|
5301
5301
|
*/
|
|
5302
|
-
description: spaceTrim__default["default"]("\n Format command describes the desired output of the
|
|
5302
|
+
description: spaceTrim__default["default"]("\n Format command describes the desired output of the template (after post-processing)\n It can set limits for the maximum/minimum length of the output, measured in characters, words, sentences, paragraphs or some other shape of the output.\n "),
|
|
5303
5303
|
/**
|
|
5304
5304
|
* Link to discussion
|
|
5305
5305
|
*/
|
|
@@ -5373,7 +5373,7 @@
|
|
|
5373
5373
|
/**
|
|
5374
5374
|
* Description of the JOKER command
|
|
5375
5375
|
*/
|
|
5376
|
-
description: "Joker parameter is used instead of executing the
|
|
5376
|
+
description: "Joker parameter is used instead of executing the template result if jokers value meets the expectations requirements",
|
|
5377
5377
|
/**
|
|
5378
5378
|
* Link to discussion
|
|
5379
5379
|
*/
|
|
@@ -5452,7 +5452,7 @@
|
|
|
5452
5452
|
/**
|
|
5453
5453
|
* Description of the MODEL command
|
|
5454
5454
|
*/
|
|
5455
|
-
description: "Tells which
|
|
5455
|
+
description: "Tells which `modelRequirements` (for example which model) to use for the prompt template execution",
|
|
5456
5456
|
/**
|
|
5457
5457
|
* Link to discussion
|
|
5458
5458
|
*/
|
|
@@ -5584,7 +5584,7 @@
|
|
|
5584
5584
|
/**
|
|
5585
5585
|
* Description of the PARAMETER command
|
|
5586
5586
|
*/
|
|
5587
|
-
description: "Describes one parameter of the
|
|
5587
|
+
description: "Describes one parameter of the template",
|
|
5588
5588
|
/**
|
|
5589
5589
|
* Link to discussion
|
|
5590
5590
|
*/
|
|
@@ -6026,7 +6026,7 @@
|
|
|
6026
6026
|
spaceTrim(
|
|
6027
6027
|
`
|
|
6028
6028
|
URL must not contain hash
|
|
6029
|
-
Hash is used for identification of the
|
|
6029
|
+
Hash is used for identification of the template in the pipeline
|
|
6030
6030
|
`,
|
|
6031
6031
|
),
|
|
6032
6032
|
);
|
|
@@ -6926,7 +6926,7 @@
|
|
|
6926
6926
|
}
|
|
6927
6927
|
var _loop_2 = function (section) {
|
|
6928
6928
|
var e_3, _d;
|
|
6929
|
-
// TODO: Parse
|
|
6929
|
+
// TODO: Parse template description (the content out of the codeblock and lists)
|
|
6930
6930
|
var listItems_2 = extractAllListItemsFromMarkdown(section.content);
|
|
6931
6931
|
var _e = extractOneBlockFromMarkdown(section.content), language = _e.language, content = _e.content;
|
|
6932
6932
|
// TODO: [🎾][1] DRY description
|
|
@@ -7013,7 +7013,7 @@
|
|
|
7013
7013
|
// TODO: [🍧] !!!!!! Should be done in BLOCK command
|
|
7014
7014
|
if ($templateJson.blockType === 'SCRIPT_TEMPLATE') {
|
|
7015
7015
|
if (!language) {
|
|
7016
|
-
throw new ParseError(spaceTrim.spaceTrim(function (block) { return "\n You must specify the language of the script in the
|
|
7016
|
+
throw new ParseError(spaceTrim.spaceTrim(function (block) { return "\n You must specify the language of the script in the SCRIPT TEMPLATE\n\n ".concat(block(getPipelineIdentification()), "\n "); }));
|
|
7017
7017
|
}
|
|
7018
7018
|
if (!SUPPORTED_SCRIPT_LANGUAGES.includes(language)) {
|
|
7019
7019
|
throw new ParseError(spaceTrim.spaceTrim(function (block) { return "\n Script language ".concat(language, " is not supported.\n\n Supported languages are:\n ").concat(block(SUPPORTED_SCRIPT_LANGUAGES.join(', ')), "\n\n "); }));
|
|
@@ -7032,7 +7032,7 @@
|
|
|
7032
7032
|
(block) => `
|
|
7033
7033
|
Model requirements are defined for the block type ${
|
|
7034
7034
|
$templateJson.blockType
|
|
7035
|
-
} which is not a
|
|
7035
|
+
} which is not a PROMPT TEMPLATE
|
|
7036
7036
|
|
|
7037
7037
|
This should be avoided by the \`modelCommandParser\`
|
|
7038
7038
|
|