@promptbook/cli 0.69.0-0 → 0.69.0-2

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 CHANGED
@@ -28,10 +28,10 @@ To install this package, run:
28
28
  npm i ptbk
29
29
 
30
30
  # Install as dev dependency
31
- npm i -D @promptbook/cli
31
+ npm install --save-dev @promptbook/cli
32
32
 
33
33
  # Or install globally
34
- npm i -g @promptbook/cli
34
+ npm install --global @promptbook/cli
35
35
  ```
36
36
 
37
37
  CLI utils for Promptbook. After install you can use `promptbook` command in terminal:
package/esm/index.es.js CHANGED
@@ -20,7 +20,7 @@ import OpenAI from 'openai';
20
20
  /**
21
21
  * The version of the Promptbook library
22
22
  */
23
- var PROMPTBOOK_VERSION = '0.68.0';
23
+ var PROMPTBOOK_VERSION = '0.69.0-1';
24
24
  // TODO: !!!! List here all the versions and annotate + put into script
25
25
 
26
26
  /*! *****************************************************************************
@@ -507,6 +507,15 @@ var DEFAULT_REMOTE_URL_PATH = '/promptbook/socket.io';
507
507
  * @public exported from `@promptbook/core`
508
508
  */
509
509
  var IS_VERBOSE = false;
510
+ /**
511
+ * @@@
512
+ *
513
+ * @private within the repository
514
+ */
515
+ var IS_PIPELINE_LOGIC_VALIDATED = just(
516
+ /**/
517
+ // Note: In normal situations, we check the pipeline logic:
518
+ true);
510
519
  /**
511
520
  * TODO: [🧠][🧜‍♂️] Maybe join remoteUrl and path into single value
512
521
  */
@@ -1040,7 +1049,7 @@ function forEachAsync(array, options, callbackfunction) {
1040
1049
  });
1041
1050
  }
1042
1051
 
1043
- var PipelineCollection = [{title:"Prepare Knowledge from Markdown",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-from-markdown.ptbk.md",promptbookVersion:"0.68.0",parameters:[{name:"knowledgeContent",description:"Markdown document content",isInput:true,isOutput:false},{name:"knowledgePieces",description:"The knowledge JSON object",isInput:false,isOutput:true}],templates:[{templateType:"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",parameters:[{name:"knowledgePieceContent",description:"The content",isInput:true,isOutput:false},{name:"keywords",description:"Keywords separated by comma",isInput:false,isOutput:true}],templates:[{templateType:"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",parameters:[{name:"knowledgePieceContent",description:"The content",isInput:true,isOutput:false},{name:"title",description:"The title of the document",isInput:false,isOutput:true}],templates:[{templateType:"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",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:[{templateType:"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"}];
1052
+ var PipelineCollection = [{title:"Prepare Knowledge from Markdown",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-from-markdown.ptbk.md",promptbookVersion:"0.69.0-1",parameters:[{name:"knowledgeContent",description:"Markdown document content",isInput:true,isOutput:false},{name:"knowledgePieces",description:"The knowledge JSON object",isInput:false,isOutput:true}],templates:[{templateType:"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.69.0-1",parameters:[{name:"knowledgePieceContent",description:"The content",isInput:true,isOutput:false},{name:"keywords",description:"Keywords separated by comma",isInput:false,isOutput:true}],templates:[{templateType:"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.69.0-1",parameters:[{name:"knowledgePieceContent",description:"The content",isInput:true,isOutput:false},{name:"title",description:"The title of the document",isInput:false,isOutput:true}],templates:[{templateType:"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.69.0-1",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:[{templateType:"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"}];
1044
1053
 
1045
1054
  /**
1046
1055
  * This error indicates that the promptbook in a markdown format cannot be parsed into a valid promptbook object
@@ -1247,6 +1256,26 @@ function isValidPipelineUrl(url) {
1247
1256
  * @public exported from `@promptbook/core`
1248
1257
  */
1249
1258
  function validatePipeline(pipeline) {
1259
+ if (IS_PIPELINE_LOGIC_VALIDATED) {
1260
+ validatePipelineCore(pipeline);
1261
+ }
1262
+ else {
1263
+ try {
1264
+ validatePipelineCore(pipeline);
1265
+ }
1266
+ catch (error) {
1267
+ if (!(error instanceof PipelineLogicError)) {
1268
+ throw error;
1269
+ }
1270
+ console.error(spaceTrim(function (block) { return "\n Pipeline is not valid but logic errors are temporarily disabled via `IS_PIPELINE_LOGIC_VALIDATED`\n\n ".concat(block(error.message), "\n "); }));
1271
+ }
1272
+ }
1273
+ return pipeline;
1274
+ }
1275
+ /**
1276
+ * @private internal function for `validatePipeline`
1277
+ */
1278
+ function validatePipelineCore(pipeline) {
1250
1279
  // TODO: [🧠] Maybe test if promptbook is a promise and make specific error case for that
1251
1280
  var e_1, _a, e_2, _b, e_3, _c;
1252
1281
  var pipelineIdentification = (function () {
@@ -1445,7 +1474,6 @@ function validatePipeline(pipeline) {
1445
1474
  while (unresovedTemplates.length > 0) {
1446
1475
  _loop_3();
1447
1476
  }
1448
- return pipeline;
1449
1477
  }
1450
1478
  /**
1451
1479
  * TODO: [🧠] Work with promptbookVersion
@@ -2227,7 +2255,7 @@ function extractVariables(script) {
2227
2255
  */
2228
2256
  function extractParameterNamesFromTemplate(template) {
2229
2257
  var e_1, _a, e_2, _b, e_3, _c;
2230
- var title = template.title, description = template.description, templateType = template.templateType, content = template.content, preparedContent = template.preparedContent, jokerParameterNames = template.jokerParameterNames;
2258
+ var title = template.title, description = template.description, templateType = template.templateType, content = template.content, preparedContent = template.preparedContent, jokerParameterNames = template.jokerParameterNames, foreach = template.foreach;
2231
2259
  var parameterNames = new Set();
2232
2260
  try {
2233
2261
  for (var _d = __values(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(extractParameterNames(title)), false), __read(extractParameterNames(description || '')), false), __read(extractParameterNames(content)), false), __read(extractParameterNames(preparedContent || '')), false)), _e = _d.next(); !_e.done; _e = _d.next()) {
@@ -2272,6 +2300,14 @@ function extractParameterNamesFromTemplate(template) {
2272
2300
  }
2273
2301
  parameterNames.delete('content');
2274
2302
  // <- Note {websiteContent} is used in `preparedContent`
2303
+ // Note: [🍭] Fixing dependent subparameterName from FOREACH command
2304
+ if (foreach !== undefined) {
2305
+ if (parameterNames.has(foreach.subparameterName)) {
2306
+ parameterNames.delete(foreach.subparameterName);
2307
+ parameterNames.add(foreach.parameterName);
2308
+ // <- TODO: [🚎] Warn/logic error when `subparameterName` not used
2309
+ }
2310
+ }
2275
2311
  return parameterNames;
2276
2312
  }
2277
2313
  /**
@@ -3300,6 +3336,7 @@ function createPipelineExecutor(options) {
3300
3336
  case 0:
3301
3337
  isJokerAttempt = attempt < 0;
3302
3338
  jokerParameterName = jokerParameterNames[jokerParameterNames.length + attempt];
3339
+ // TODO: [🧠] !!!!!! JOKERS, EXPECTATIONS, POSTPROCESSING and FOREACH
3303
3340
  if (isJokerAttempt && !jokerParameterName) {
3304
3341
  throw new UnexpectedError(spaceTrim(function (block) { return "\n Joker not found in attempt ".concat(attempt, "\n\n ").concat(block(pipelineIdentification), "\n "); }));
3305
3342
  }
@@ -3618,6 +3655,19 @@ function createPipelineExecutor(options) {
3618
3655
  attempt++;
3619
3656
  return [3 /*break*/, 4];
3620
3657
  case 7:
3658
+ //------------------------------------
3659
+ /*
3660
+
3661
+
3662
+
3663
+
3664
+
3665
+
3666
+
3667
+
3668
+
3669
+ */
3670
+ //------------------------------------
3621
3671
  if (resultString === null) {
3622
3672
  throw new UnexpectedError(spaceTrim(function (block) { return "\n Something went wrong and prompt result is null\n\n ".concat(block(pipelineIdentification), "\n "); }));
3623
3673
  }
@@ -5145,20 +5195,21 @@ var foreachCommandParser = {
5145
5195
  * Example usages of the FOREACH command
5146
5196
  */
5147
5197
  examples: [
5148
- 'FOREACH List Line -> `{customer}`',
5149
- 'FOR List Line -> `{customer}`',
5150
- 'EACH List Line -> `{customer}`',
5198
+ 'FOREACH List Line `{customers}` -> `{customer}`',
5199
+ 'FOR List Line `{customers}` -> `{customer}`',
5200
+ 'EACH List Line `{customers}` -> `{customer}`',
5151
5201
  // <- TODO: [🍭] !!!!!! More
5152
5202
  ],
5153
5203
  /**
5154
5204
  * Parses the FOREACH command
5155
5205
  */
5156
5206
  parse: function (input) {
5157
- var args = input.args, rawArgs = input.rawArgs;
5207
+ var args = input.args;
5158
5208
  var formatName = normalizeTo_SCREAMING_CASE(args[0] || '');
5159
5209
  var cellName = normalizeTo_SCREAMING_CASE(args[1] || '');
5160
- var assignSign = args[2];
5161
- var parameter = args[3];
5210
+ var parameterNameWrapped = args[2];
5211
+ var assignSign = args[3];
5212
+ var subparameterNameWrapped = args[4];
5162
5213
  if (![
5163
5214
  'LIST',
5164
5215
  'CSV',
@@ -5173,7 +5224,7 @@ var foreachCommandParser = {
5173
5224
  'ROW',
5174
5225
  'COLUMN',
5175
5226
  'CELL',
5176
- // <- TODO: [🏢] Unhardcode format cekks
5227
+ // <- TODO: [🏢] Unhardcode format cells
5177
5228
  ].includes(cellName)) {
5178
5229
  console.info({ args: args, cellName: cellName });
5179
5230
  throw new Error("Format ".concat(formatName, " does not support cell \"").concat(cellName, "\""));
@@ -5183,24 +5234,27 @@ var foreachCommandParser = {
5183
5234
  console.info({ args: args, assignSign: assignSign });
5184
5235
  throw new Error("FOREACH command must have '->' to assign the value to the parameter");
5185
5236
  }
5186
- var parameterNames = extractParameterNames(parameter || rawArgs);
5187
- if (parameterNames.size !== 1) {
5188
- console.info({ args: args, parameter: parameter, rawArgs: rawArgs });
5189
- throw new Error("FOREACH command contain exactly one parameter, but found ".concat(parameterNames.size));
5190
- }
5191
- var parameterName = parameterNames.values().next().value;
5192
- if (typeof parameterName !== 'string'
5193
- // <- TODO: !!!!!! Replace with propper parameter name validation
5194
- ) {
5195
- console.info({ args: args, parameterName: parameterName });
5196
- throw new Error("Invalid parameter name");
5197
- // <- TODO: !!!!!! Better error (with rules and precise error) from validateParameterName
5198
- }
5237
+ // TODO: !!!!!! Replace with propper parameter name validation
5238
+ if ((parameterNameWrapped === null || parameterNameWrapped === void 0 ? void 0 : parameterNameWrapped.substring(0, 1)) !== '{' ||
5239
+ (parameterNameWrapped === null || parameterNameWrapped === void 0 ? void 0 : parameterNameWrapped.substring(parameterNameWrapped.length - 1, parameterNameWrapped.length)) !== '}') {
5240
+ console.info({ args: args, parameterNameWrapped: parameterNameWrapped }, parameterNameWrapped === null || parameterNameWrapped === void 0 ? void 0 : parameterNameWrapped.substring(0, 1), parameterNameWrapped === null || parameterNameWrapped === void 0 ? void 0 : parameterNameWrapped.substring(parameterNameWrapped.length - 1, parameterNameWrapped.length));
5241
+ throw new Error("!!!!!! 1 Here will be error (with rules and precise error) from validateParameterName");
5242
+ }
5243
+ var parameterName = parameterNameWrapped.substring(1, parameterNameWrapped.length - 1);
5244
+ // TODO: !!!!!! Replace with propper parameter name validation
5245
+ if ((subparameterNameWrapped === null || subparameterNameWrapped === void 0 ? void 0 : subparameterNameWrapped.substring(0, 1)) !== '{' ||
5246
+ (subparameterNameWrapped === null || subparameterNameWrapped === void 0 ? void 0 : subparameterNameWrapped.substring(subparameterNameWrapped.length - 1, subparameterNameWrapped.length)) !==
5247
+ '}') {
5248
+ console.info({ args: args, subparameterNameWrapped: subparameterNameWrapped });
5249
+ throw new Error("!!!!!! 2 Here will be error (with rules and precise error) from validateParameterName");
5250
+ }
5251
+ var subparameterName = subparameterNameWrapped.substring(1, subparameterNameWrapped.length - 1);
5199
5252
  return {
5200
5253
  type: 'FOREACH',
5201
5254
  formatName: formatName,
5202
5255
  cellName: cellName,
5203
5256
  parameterName: parameterName,
5257
+ subparameterName: subparameterName,
5204
5258
  };
5205
5259
  },
5206
5260
  /**
@@ -5209,8 +5263,10 @@ var foreachCommandParser = {
5209
5263
  * Note: `$` is used to indicate that this function mutates given `templateJson`
5210
5264
  */
5211
5265
  $applyToTemplateJson: function (command, $templateJson, $pipelineJson) {
5212
- keepUnused(command, $templateJson, $pipelineJson);
5213
- // <- TODO: [🍭] !!!!!! Implement
5266
+ var formatName = command.formatName, cellName = command.cellName, parameterName = command.parameterName, subparameterName = command.subparameterName;
5267
+ $templateJson.foreach = { formatName: formatName, cellName: cellName, parameterName: parameterName, subparameterName: subparameterName };
5268
+ keepUnused($pipelineJson); // <- TODO: !!!!!! BUT Maybe register subparameter from foreach into parameters of the pipeline
5269
+ // Note: [🍭] FOREACH apply has some sideeffects on different places in codebase
5214
5270
  },
5215
5271
  /**
5216
5272
  * Converts the FOREACH command back to string
@@ -5219,8 +5275,7 @@ var foreachCommandParser = {
5219
5275
  */
5220
5276
  stringify: function (command) {
5221
5277
  keepUnused(command);
5222
- return "";
5223
- // <- TODO: [🍭] !!!!!! Implement
5278
+ return "---"; // <- TODO: [🛋] Implement
5224
5279
  },
5225
5280
  /**
5226
5281
  * Reads the FOREACH command from the `TemplateJson`
@@ -5229,8 +5284,7 @@ var foreachCommandParser = {
5229
5284
  */
5230
5285
  takeFromTemplateJson: function ($templateJson) {
5231
5286
  keepUnused($templateJson);
5232
- return [];
5233
- // <- TODO: [🍭] !!!!!! Implement
5287
+ throw new NotYetImplementedError("[\uD83D\uDECB] Not implemented yet"); // <- TODO: [🛋] Implement
5234
5288
  },
5235
5289
  };
5236
5290
  /**
@@ -5345,6 +5399,7 @@ var jokerCommandParser = {
5345
5399
  */
5346
5400
  parse: function (input) {
5347
5401
  var args = input.args;
5402
+ // TODO: !!!!!! Replace with propper parameter name validation
5348
5403
  var parametersMatch = (args.pop() || '').match(/^\{(?<parameterName>[a-z0-9_]+)\}$/im);
5349
5404
  if (!parametersMatch || !parametersMatch.groups || !parametersMatch.groups.parameterName) {
5350
5405
  throw new ParseError("Invalid joker");
@@ -5474,6 +5529,7 @@ var modelCommandParser = {
5474
5529
  if ($pipelineJson.defaultModelRequirements[command.key] !== undefined) {
5475
5530
  if ($pipelineJson.defaultModelRequirements[command.key] === command.value) {
5476
5531
  console.warn("Multiple commands `MODEL ".concat(command.key, " ").concat(command.value, "` in the pipeline head"));
5532
+ // <- TODO: [🚎] Some better way how to get warnings from pipeline parsing / logic
5477
5533
  }
5478
5534
  else {
5479
5535
  throw new ParseError(spaceTrim$1("\n Redefinition of MODEL `".concat(command.key, "` in the pipeline head\n\n You have used:\n - MODEL ").concat(command.key, " ").concat($pipelineJson.defaultModelRequirements[command.key], "\n - MODEL ").concat(command.key, " ").concat(command.value, "\n ")));
@@ -8528,6 +8584,9 @@ function renderPromptbookMermaid(pipelineJson, options) {
8528
8584
  return promptbookMermaid;
8529
8585
  }
8530
8586
  /**
8587
+ * TODO: !!!!!! FOREACH in mermaid graph
8588
+ * TODO: !!!!!! Knowledge in mermaid graph
8589
+ * TODO: !!!!!! Personas in mermaid graph
8531
8590
  * TODO: Maybe use some Mermaid package instead of string templating
8532
8591
  * TODO: [🕌] When more than 2 functionalities, split into separate functions
8533
8592
  */