@promptbook/core 0.69.0-15 → 0.69.0-17

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.
Files changed (27) hide show
  1. package/README.md +4 -0
  2. package/esm/index.es.js +30 -29
  3. package/esm/index.es.js.map +1 -1
  4. package/esm/typings/promptbook-collection/index.d.ts +0 -3
  5. package/esm/typings/src/cli/cli-commands/make.d.ts +1 -1
  6. package/esm/typings/src/collection/constructors/createCollectionFromUrl.d.ts +1 -1
  7. package/esm/typings/src/config.d.ts +2 -2
  8. package/esm/typings/src/conversion/pipelineStringToJsonSync.d.ts +1 -1
  9. package/esm/typings/src/conversion/validation/validatePipeline.d.ts +5 -5
  10. package/esm/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.d.ts +1 -1
  11. package/esm/typings/src/knowledge/prepare-knowledge/pdf/prepareKnowledgeFromPdf.d.ts +1 -1
  12. package/esm/typings/src/llm-providers/_common/utils/cache/CacheItem.d.ts +1 -1
  13. package/esm/typings/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +1 -1
  14. package/esm/typings/src/llm-providers/anthropic-claude/createAnthropicClaudeExecutionTools.d.ts +2 -2
  15. package/esm/typings/src/llm-providers/anthropic-claude/playground/playground.d.ts +2 -2
  16. package/esm/typings/src/llm-providers/openai/playground/playground.d.ts +1 -1
  17. package/esm/typings/src/personas/preparePersona.d.ts +1 -1
  18. package/esm/typings/src/prepare/isPipelinePrepared.d.ts +1 -1
  19. package/esm/typings/src/prepare/prepareTemplates.d.ts +1 -1
  20. package/esm/typings/src/types/PipelineJson/PipelineJson.d.ts +1 -1
  21. package/esm/typings/src/types/typeAliases.d.ts +1 -1
  22. package/esm/typings/src/utils/serialization/checkSerializableAsJson.d.ts +1 -1
  23. package/esm/typings/src/utils/serialization/isSerializableAsJson.d.ts +1 -1
  24. package/package.json +1 -1
  25. package/umd/index.umd.js +30 -29
  26. package/umd/index.umd.js.map +1 -1
  27. package/esm/typings/src/personas/preparePersona.test.d.ts +0 -1
package/README.md CHANGED
@@ -16,6 +16,10 @@ Supercharge your use of large language models
16
16
 
17
17
 
18
18
 
19
+ ## ✨ New Features
20
+
21
+ - ✨ **Support of [OpenAI o1 model](https://openai.com/o1/)**
22
+
19
23
  ## 📦 Package `@promptbook/core`
20
24
 
21
25
  - Promptbooks are [divided into several](#-packages) packages, all are published from [single monorepo](https://github.com/webgptorg/promptbook).
package/esm/index.es.js CHANGED
@@ -11,8 +11,8 @@ import moment from 'moment';
11
11
  /**
12
12
  * The version of the Promptbook library
13
13
  */
14
- var PROMPTBOOK_VERSION = '0.69.0-14';
15
- // TODO: !!!! List here all the versions and annotate + put into script
14
+ var PROMPTBOOK_VERSION = '0.69.0-16';
15
+ // TODO:[main] !!!! List here all the versions and annotate + put into script
16
16
 
17
17
  /*! *****************************************************************************
18
18
  Copyright (c) Microsoft Corporation.
@@ -224,7 +224,7 @@ function pipelineJsonToString(pipelineJson) {
224
224
  commands.push("PIPELINE URL ".concat(pipelineUrl));
225
225
  }
226
226
  commands.push("PROMPTBOOK VERSION ".concat(promptbookVersion));
227
- // TODO: !!! This increase size of the bundle and is probbably not necessary
227
+ // TODO:[main] !!! This increase size of the bundle and is probbably not necessary
228
228
  pipelineString = prettifyMarkdown(pipelineString);
229
229
  try {
230
230
  for (var _g = __values(parameters.filter(function (_a) {
@@ -372,12 +372,12 @@ function pipelineJsonToString(pipelineJson) {
372
372
  pipelineString += '```' + contentLanguage;
373
373
  pipelineString += '\n';
374
374
  pipelineString += spaceTrim(content);
375
- // <- TODO: !!! Escape
375
+ // <- TODO:[main] !!! Escape
376
376
  // <- TODO: [🧠] Some clear strategy how to spaceTrim the blocks
377
377
  pipelineString += '\n';
378
378
  pipelineString += '```';
379
379
  pipelineString += '\n\n';
380
- pipelineString += "`-> {".concat(resultingParameterName, "}`"); // <- TODO: !!! If the parameter here has description, add it and use templateParameterJsonToString
380
+ pipelineString += "`-> {".concat(resultingParameterName, "}`"); // <- TODO:[main] !!! If the parameter here has description, add it and use templateParameterJsonToString
381
381
  }
382
382
  }
383
383
  catch (e_3_1) { e_3 = { error: e_3_1 }; }
@@ -597,7 +597,7 @@ function checkSerializableAsJson(name, value) {
597
597
  }
598
598
  /**
599
599
  * TODO: [🧠][🛣] More elegant way to tracking than passing `name`
600
- * TODO: [🧠] !!! In-memory cache of same values to prevent multiple checks
600
+ * TODO: [🧠][main] !!! In-memory cache of same values to prevent multiple checks
601
601
  * Note: [🐠] This is how `checkSerializableAsJson` + `isSerializableAsJson` together can just retun true/false or rich error message
602
602
  */
603
603
 
@@ -668,14 +668,14 @@ var MAX_EXECUTION_ATTEMPTS = 3; // <- TODO: [🤹‍♂️]
668
668
  var MAX_FILENAME_LENGTH = 30;
669
669
  /**
670
670
  * @@@
671
- * TODO: [🐝] !!! Use
671
+ * TODO: [🐝][main] !!! Use
672
672
  *
673
673
  * @public exported from `@promptbook/core`
674
674
  */
675
675
  var MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH = 3;
676
676
  /**
677
677
  * @@@
678
- * TODO: [🐝] !!! Use
678
+ * TODO: [🐝][main] !!! Use
679
679
  *
680
680
  * @public exported from `@promptbook/core`
681
681
  */
@@ -851,7 +851,7 @@ function isValidPromptbookVersion(version) {
851
851
  if ( /* version === '1.0.0' || */version === '2.0.0' || version === '3.0.0') {
852
852
  return false;
853
853
  }
854
- // <- TODO: !!! Check isValidPromptbookVersion against PROMPTBOOK_VERSIONS
854
+ // <- TODO:[main] !!! Check isValidPromptbookVersion against PROMPTBOOK_VERSIONS
855
855
  return true;
856
856
  }
857
857
 
@@ -1020,7 +1020,7 @@ function validatePipelineCore(pipeline) {
1020
1020
  // <- Note: [🚲]
1021
1021
  throw new PipelineLogicError(spaceTrim$1(function (block) { return "\n Invalid promptbook URL \"".concat(pipeline.pipelineUrl, "\"\n\n ").concat(block(pipelineIdentification), "\n "); }));
1022
1022
  }
1023
- if (!isValidPromptbookVersion(pipeline.promptbookVersion)) {
1023
+ if (pipeline.promptbookVersion !== undefined && !isValidPromptbookVersion(pipeline.promptbookVersion)) {
1024
1024
  // <- Note: [🚲]
1025
1025
  throw new PipelineLogicError(spaceTrim$1(function (block) { return "\n Invalid Promptbook Version \"".concat(pipeline.promptbookVersion, "\"\n\n ").concat(block(pipelineIdentification), "\n "); }));
1026
1026
  }
@@ -1215,11 +1215,11 @@ function validatePipelineCore(pipeline) {
1215
1215
  * > ex port function validatePipeline(promptbook: really_unknown): asserts promptbook is PipelineJson {
1216
1216
  */
1217
1217
  /**
1218
- * TODO: [🐣] !!!! Validate that all samples match expectations
1219
- * TODO: [🐣][🐝] !!!! Validate that knowledge is valid (non-void)
1220
- * TODO: [🐣] !!!! Validate that persona can be used only with CHAT variant
1221
- * TODO: [🐣] !!!! Validate that parameter with reserved name not used RESERVED_PARAMETER_NAMES
1222
- * TODO: [🐣] !!!! Validate that reserved parameter is not used as joker
1218
+ * TODO: [🐣][main] !!!! Validate that all samples match expectations
1219
+ * TODO: [🐣][🐝][main] !!!! Validate that knowledge is valid (non-void)
1220
+ * TODO: [🐣][main] !!!! Validate that persona can be used only with CHAT variant
1221
+ * TODO: [🐣][main] !!!! Validate that parameter with reserved name not used RESERVED_PARAMETER_NAMES
1222
+ * TODO: [🐣][main] !!!! Validate that reserved parameter is not used as joker
1223
1223
  * TODO: [🧠] Validation not only logic itself but imports around - files and websites and rerefenced pipelines exists
1224
1224
  * TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
1225
1225
  */
@@ -1533,7 +1533,7 @@ function createCollectionFromUrl(url, options) {
1533
1533
  });
1534
1534
  }
1535
1535
  /**
1536
- * TODO: !!!! [🧠] Library precompilation and do not mix markdown and json promptbooks
1536
+ * TODO:[main] !!!! [🧠] Library precompilation and do not mix markdown and json promptbooks
1537
1537
  */
1538
1538
 
1539
1539
  /**
@@ -1830,7 +1830,7 @@ function forEachAsync(array, options, callbackfunction) {
1830
1830
  });
1831
1831
  }
1832
1832
 
1833
- var PipelineCollection = [{title:"Prepare Knowledge from Markdown",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-from-markdown.ptbk.md",promptbookVersion:"0.69.0-14",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-14",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-14",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-14",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"}];
1833
+ var PipelineCollection = [{title:"Prepare Knowledge from Markdown",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-from-markdown.ptbk.md",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",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",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",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"}];
1834
1834
 
1835
1835
  var defaultDiacriticsRemovalMap = [
1836
1836
  {
@@ -2381,7 +2381,7 @@ function isPipelinePrepared(pipeline) {
2381
2381
  return true;
2382
2382
  }
2383
2383
  /**
2384
- * TODO: [🔃] !!!!! If the pipeline was prepared with different version or different set of models, prepare it once again
2384
+ * TODO: [🔃][main] !!!!! If the pipeline was prepared with different version or different set of models, prepare it once again
2385
2385
  * TODO: [🐠] Maybe base this on `makeValidator`
2386
2386
  * TODO: [🧊] Pipeline can be partially prepared, this should return true ONLY if fully prepared
2387
2387
  * TODO: [🧿] Maybe do same process with same granularity and subfinctions as `preparePipeline`
@@ -4814,7 +4814,7 @@ function prepareKnowledgeFromMarkdown(knowledgeContent /* <- TODO: [🖖] (?mayb
4814
4814
  outputParameters = result.outputParameters;
4815
4815
  knowledgePiecesRaw = outputParameters.knowledgePieces;
4816
4816
  knowledgeTextPieces = (knowledgePiecesRaw || '').split('\n---\n');
4817
- // <- TODO: !!!!! Smarter split and filter out empty pieces
4817
+ // <- TODO:[main] !!!!! Smarter split and filter out empty pieces
4818
4818
  if (isVerbose) {
4819
4819
  console.info('knowledgeTextPieces:', knowledgeTextPieces);
4820
4820
  }
@@ -4899,7 +4899,7 @@ function prepareKnowledgeFromMarkdown(knowledgeContent /* <- TODO: [🖖] (?mayb
4899
4899
  });
4900
4900
  }
4901
4901
  /**
4902
- * TODO: [🐝][🔼] !!! Export via `@promptbook/markdown`
4902
+ * TODO: [🐝][🔼][main] !!! Export via `@promptbook/markdown`
4903
4903
  * TODO: [🪂] Do it in parallel 11:11
4904
4904
  * Note: No need to aggregate usage here, it is done by intercepting the llmTools
4905
4905
  */
@@ -4923,7 +4923,7 @@ function prepareKnowledgePieces(knowledgeSources, options) {
4923
4923
  var partialPieces, pieces;
4924
4924
  return __generator(this, function (_a) {
4925
4925
  switch (_a.label) {
4926
- case 0: return [4 /*yield*/, prepareKnowledgeFromMarkdown(knowledgeSource.sourceContent, // <- TODO: [🐝] !!! Unhardcode markdown, detect which type it is - BE AWARE of big package size
4926
+ case 0: return [4 /*yield*/, prepareKnowledgeFromMarkdown(knowledgeSource.sourceContent, // <- TODO: [🐝][main] !!! Unhardcode markdown, detect which type it is - BE AWARE of big package size
4927
4927
  options)];
4928
4928
  case 1:
4929
4929
  partialPieces = _a.sent();
@@ -5115,7 +5115,7 @@ function preparePersona(personaDescription, options) {
5115
5115
  });
5116
5116
  }
5117
5117
  /**
5118
- * TODO: [🔃] !!!!! If the persona was prepared with different version or different set of models, prepare it once again
5118
+ * TODO: [🔃][main] !!!!! If the persona was prepared with different version or different set of models, prepare it once again
5119
5119
  * TODO: [🏢] !! Check validity of `modelName` in pipeline
5120
5120
  * TODO: [🏢] !! Check validity of `systemMessage` in pipeline
5121
5121
  * TODO: [🏢] !! Check validity of `temperature` in pipeline
@@ -5164,7 +5164,7 @@ function prepareTemplates(pipeline, options) {
5164
5164
  case 0:
5165
5165
  _a = options.maxParallelCount, maxParallelCount = _a === void 0 ? MAX_PARALLEL_COUNT : _a;
5166
5166
  templates = pipeline.templates, parameters = pipeline.parameters, knowledgePiecesCount = pipeline.knowledgePiecesCount;
5167
- // TODO: !!!!! Apply samples to each template (if missing and is for the template defined)
5167
+ // TODO:[main] !!!!! Apply samples to each template (if missing and is for the template defined)
5168
5168
  TODO_USE(parameters);
5169
5169
  templatesPrepared = new Array(
5170
5170
  // <- TODO: [🧱] Implement in a functional (not new Class) way
@@ -5196,7 +5196,7 @@ function prepareTemplates(pipeline, options) {
5196
5196
  /**
5197
5197
  * TODO: [🧠] Add context to each template (if missing)
5198
5198
  * TODO: [🧠] What is better name `prepareTemplate` or `prepareTemplateAndParameters`
5199
- * TODO: [♨] !!! Prepare index the samples and maybe templates
5199
+ * TODO: [♨][main] !!! Prepare index the samples and maybe templates
5200
5200
  * TODO: Write tests for `preparePipeline`
5201
5201
  * TODO: [🏏] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch
5202
5202
  * TODO: [🧊] In future one preparation can take data from previous preparation and save tokens and time
@@ -5368,7 +5368,7 @@ var knowledgeCommandParser = {
5368
5368
  if (sourceContent === '') {
5369
5369
  throw new ParseError("Source is not defined");
5370
5370
  }
5371
- // TODO: !!!! Following checks should be applied every link in the `sourceContent`
5371
+ // TODO:[main] !!!! Following checks should be applied every link in the `sourceContent`
5372
5372
  if (sourceContent.startsWith('http://')) {
5373
5373
  throw new ParseError("Source is not secure");
5374
5374
  }
@@ -5553,7 +5553,7 @@ var templateCommandParser = {
5553
5553
  if (command.templateType === 'KNOWLEDGE') {
5554
5554
  knowledgeCommandParser.$applyToPipelineJson({
5555
5555
  type: 'KNOWLEDGE',
5556
- sourceContent: $templateJson.content, // <- TODO: [🐝] !!! Work with KNOWLEDGE which not referring to the source file or website, but its content itself
5556
+ sourceContent: $templateJson.content, // <- TODO: [🐝][main] !!! Work with KNOWLEDGE which not referring to the source file or website, but its content itself
5557
5557
  }, $pipelineJson);
5558
5558
  $templateJson.isTemplate = false;
5559
5559
  return;
@@ -6850,6 +6850,7 @@ var promptbookVersionCommandParser = {
6850
6850
  * Note: `$` is used to indicate that this function mutates given `pipelineJson`
6851
6851
  */
6852
6852
  $applyToPipelineJson: function (command, $pipelineJson) {
6853
+ // TODO: Warn if the version is overridden
6853
6854
  $pipelineJson.promptbookVersion = command.promptbookVersion;
6854
6855
  },
6855
6856
  /**
@@ -7670,7 +7671,7 @@ function pipelineStringToJsonSync(pipelineString) {
7670
7671
  var $pipelineJson = {
7671
7672
  title: undefined /* <- Note: [🍙] Putting here placeholder to keep `title` on top at final JSON */,
7672
7673
  pipelineUrl: undefined /* <- Note: Putting here placeholder to keep `pipelineUrl` on top at final JSON */,
7673
- promptbookVersion: PROMPTBOOK_VERSION,
7674
+ promptbookVersion: undefined /* <- Note: By default no explicit version */,
7674
7675
  description: undefined /* <- Note: [🍙] Putting here placeholder to keep `description` on top at final JSON */,
7675
7676
  parameters: [],
7676
7677
  templates: [],
@@ -7961,7 +7962,7 @@ function pipelineStringToJsonSync(pipelineString) {
7961
7962
  return $asDeeplyFrozenSerializableJson('pipelineJson', $pipelineJson);
7962
7963
  }
7963
7964
  /**
7964
- * TODO: !!!! Warn if used only sync version
7965
+ * TODO:[main] !!!! Warn if used only sync version
7965
7966
  * TODO: [🚞] Report here line/column of error
7966
7967
  * TODO: Use spaceTrim more effectively
7967
7968
  * TODO: [🧠] Parameter flags - isInput, isOutput, isInternal
@@ -8175,7 +8176,7 @@ function isSerializableAsJson(value) {
8175
8176
  }
8176
8177
  }
8177
8178
  /**
8178
- * TODO: [🧠] !!! In-memory cache of same values to prevent multiple checks
8179
+ * TODO: [🧠][main] !!! In-memory cache of same values to prevent multiple checks
8179
8180
  * TODO: [🧠][💺] Can be done this on type-level?
8180
8181
  */
8181
8182