@promptbook/cli 0.61.0-26 → 0.61.0-27

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/esm/index.es.js +26 -31
  2. package/esm/index.es.js.map +1 -1
  3. package/esm/typings/src/collection/constructors/createCollectionFromDirectory.d.ts +0 -1
  4. package/esm/typings/src/conversion/utils/stringifyPipelineJson.d.ts +1 -1
  5. package/esm/typings/src/conversion/validation/validatePipeline.d.ts +6 -6
  6. package/esm/typings/src/execution/PipelineExecutor.d.ts +1 -1
  7. package/esm/typings/src/execution/createPipelineExecutor.d.ts +3 -3
  8. package/esm/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +1 -1
  9. package/esm/typings/src/prepare/isPipelinePrepared.d.ts +3 -3
  10. package/esm/typings/src/prepare/preparePipeline.d.ts +1 -1
  11. package/esm/typings/src/prepare/prepareTemplates.d.ts +1 -1
  12. package/esm/typings/src/types/ModelRequirements.d.ts +1 -1
  13. package/esm/typings/src/utils/extractParameterNames.d.ts +0 -3
  14. package/package.json +2 -2
  15. package/umd/index.umd.js +26 -31
  16. package/umd/index.umd.js.map +1 -1
  17. package/umd/typings/src/collection/constructors/createCollectionFromDirectory.d.ts +0 -1
  18. package/umd/typings/src/conversion/utils/stringifyPipelineJson.d.ts +1 -1
  19. package/umd/typings/src/conversion/validation/validatePipeline.d.ts +6 -6
  20. package/umd/typings/src/execution/PipelineExecutor.d.ts +1 -1
  21. package/umd/typings/src/execution/createPipelineExecutor.d.ts +3 -3
  22. package/umd/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +1 -1
  23. package/umd/typings/src/prepare/isPipelinePrepared.d.ts +3 -3
  24. package/umd/typings/src/prepare/preparePipeline.d.ts +1 -1
  25. package/umd/typings/src/prepare/prepareTemplates.d.ts +1 -1
  26. package/umd/typings/src/types/ModelRequirements.d.ts +1 -1
  27. package/umd/typings/src/utils/extractParameterNames.d.ts +0 -3
package/esm/index.es.js CHANGED
@@ -150,7 +150,7 @@ new Function("\n try {\n if (typeof WorkerGlobalScope !== 'undefined'
150
150
  /**
151
151
  * The version of the Promptbook library
152
152
  */
153
- var PROMPTBOOK_VERSION = '0.61.0-25';
153
+ var PROMPTBOOK_VERSION = '0.61.0-26';
154
154
  // TODO: !!!! List here all the versions and annotate + put into script
155
155
 
156
156
  /**
@@ -747,7 +747,7 @@ function forEachAsync(array, options, callbackfunction) {
747
747
  });
748
748
  }
749
749
 
750
- var PipelineCollection = [{title:"Prepare Knowledge from Markdown",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-from-markdown.ptbk.md",promptbookVersion:"0.61.0-25",parameters:[{name:"knowledgeContent",description:"Markdown document content",isInput:true,isOutput:false},{name:"knowledgePieces",description:"The knowledge JSON object",isInput:false,isOutput:true}],promptTemplates:[{blockType:"PROMPT_TEMPLATE",name:"knowledge",title:"Knowledge",modelRequirements:{modelVariant:"CHAT",modelName:"claude-3-opus-20240229"},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}",dependentParameterNames:["knowledgeContent"],resultingParameterName:"knowledgePieces"}],knowledgeSources:[],knowledgePieces:[],personas:[],preparations:[{id:1,promptbookVersion:"0.61.0-25",modelUsage:{price:{value:0},input:{tokensCount:{value:0},charactersCount:{value:0},wordsCount:{value:0},sentencesCount:{value:0},linesCount:{value:0},paragraphsCount:{value:0},pagesCount:{value:0}},output:{tokensCount:{value:0},charactersCount:{value:0},wordsCount:{value:0},sentencesCount:{value:0},linesCount:{value:0},paragraphsCount:{value:0},pagesCount:{value:0}}}}],sourceFile:"./promptbook-collection/prepare-knowledge-from-markdown.ptbk.md"},{title:"Prepare Keywords",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-keywords.ptbk.md",promptbookVersion:"0.61.0-25",parameters:[{name:"knowledgePieceContent",description:"The content",isInput:true,isOutput:false},{name:"keywords",description:"Keywords separated by comma",isInput:false,isOutput:true}],promptTemplates:[{blockType:"PROMPT_TEMPLATE",name:"knowledge",title:"Knowledge",modelRequirements:{modelVariant:"CHAT",modelName:"claude-3-opus-20240229"},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}",dependentParameterNames:["knowledgePieceContent"],resultingParameterName:"keywords"}],knowledgeSources:[],knowledgePieces:[],personas:[],preparations:[{id:1,promptbookVersion:"0.61.0-25",modelUsage:{price:{value:0},input:{tokensCount:{value:0},charactersCount:{value:0},wordsCount:{value:0},sentencesCount:{value:0},linesCount:{value:0},paragraphsCount:{value:0},pagesCount:{value:0}},output:{tokensCount:{value:0},charactersCount:{value:0},wordsCount:{value:0},sentencesCount:{value:0},linesCount:{value:0},paragraphsCount:{value:0},pagesCount:{value:0}}}}],sourceFile:"./promptbook-collection/prepare-knowledge-keywords.ptbk.md"},{title:"Prepare Title",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-title.ptbk.md",promptbookVersion:"0.61.0-25",parameters:[{name:"knowledgePieceContent",description:"The content",isInput:true,isOutput:false},{name:"title",description:"The title of the document",isInput:false,isOutput:true}],promptTemplates:[{blockType:"PROMPT_TEMPLATE",name:"knowledge",title:"Knowledge",modelRequirements:{modelVariant:"CHAT",modelName:"claude-3-opus-20240229"},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}",expectations:{words:{min:1,max:8}},dependentParameterNames:["knowledgePieceContent"],resultingParameterName:"title"}],knowledgeSources:[],knowledgePieces:[],personas:[],preparations:[{id:1,promptbookVersion:"0.61.0-25",modelUsage:{price:{value:0},input:{tokensCount:{value:0},charactersCount:{value:0},wordsCount:{value:0},sentencesCount:{value:0},linesCount:{value:0},paragraphsCount:{value:0},pagesCount:{value:0}},output:{tokensCount:{value:0},charactersCount:{value:0},wordsCount:{value:0},sentencesCount:{value:0},linesCount:{value:0},paragraphsCount:{value:0},pagesCount:{value:0}}}}],sourceFile:"./promptbook-collection/prepare-knowledge-title.ptbk.md"},{title:"Prepare Keywords",pipelineUrl:"https://promptbook.studio/promptbook/prepare-persona.ptbk.md",promptbookVersion:"0.61.0-25",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}],promptTemplates:[{blockType:"PROMPT_TEMPLATE",name:"make-model-requirements",title:"Make modelRequirements",modelRequirements:{modelVariant:"CHAT",modelName:"gpt-4-turbo"},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### Option `modelName`\n\nPick from the following models:\n\n- {availableModelNames}\n\n### Option `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### Option `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}",expectFormat:"JSON",dependentParameterNames:["availableModelNames","personaDescription"],resultingParameterName:"modelRequirements"}],knowledgeSources:[],knowledgePieces:[],personas:[],preparations:[{id:1,promptbookVersion:"0.61.0-25",modelUsage:{price:{value:0},input:{tokensCount:{value:0},charactersCount:{value:0},wordsCount:{value:0},sentencesCount:{value:0},linesCount:{value:0},paragraphsCount:{value:0},pagesCount:{value:0}},output:{tokensCount:{value:0},charactersCount:{value:0},wordsCount:{value:0},sentencesCount:{value:0},linesCount:{value:0},paragraphsCount:{value:0},pagesCount:{value:0}}}}],sourceFile:"./promptbook-collection/prepare-persona.ptbk.md"}];
750
+ var PipelineCollection = [{title:"Prepare Knowledge from Markdown",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-from-markdown.ptbk.md",promptbookVersion:"0.61.0-26",parameters:[{name:"knowledgeContent",description:"Markdown document content",isInput:true,isOutput:false},{name:"knowledgePieces",description:"The knowledge JSON object",isInput:false,isOutput:true}],promptTemplates:[{blockType:"PROMPT_TEMPLATE",name:"knowledge",title:"Knowledge",modelRequirements:{modelVariant:"CHAT",modelName:"claude-3-opus-20240229"},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}",dependentParameterNames:["knowledgeContent"],resultingParameterName:"knowledgePieces"}],knowledgeSources:[],knowledgePieces:[],personas:[],preparations:[{id:1,promptbookVersion:"0.61.0-26",modelUsage:{price:{value:0},input:{tokensCount:{value:0},charactersCount:{value:0},wordsCount:{value:0},sentencesCount:{value:0},linesCount:{value:0},paragraphsCount:{value:0},pagesCount:{value:0}},output:{tokensCount:{value:0},charactersCount:{value:0},wordsCount:{value:0},sentencesCount:{value:0},linesCount:{value:0},paragraphsCount:{value:0},pagesCount:{value:0}}}}],sourceFile:"./promptbook-collection/prepare-knowledge-from-markdown.ptbk.md"},{title:"Prepare Keywords",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-keywords.ptbk.md",promptbookVersion:"0.61.0-26",parameters:[{name:"knowledgePieceContent",description:"The content",isInput:true,isOutput:false},{name:"keywords",description:"Keywords separated by comma",isInput:false,isOutput:true}],promptTemplates:[{blockType:"PROMPT_TEMPLATE",name:"knowledge",title:"Knowledge",modelRequirements:{modelVariant:"CHAT",modelName:"claude-3-opus-20240229"},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}",dependentParameterNames:["knowledgePieceContent"],resultingParameterName:"keywords"}],knowledgeSources:[],knowledgePieces:[],personas:[],preparations:[{id:1,promptbookVersion:"0.61.0-26",modelUsage:{price:{value:0},input:{tokensCount:{value:0},charactersCount:{value:0},wordsCount:{value:0},sentencesCount:{value:0},linesCount:{value:0},paragraphsCount:{value:0},pagesCount:{value:0}},output:{tokensCount:{value:0},charactersCount:{value:0},wordsCount:{value:0},sentencesCount:{value:0},linesCount:{value:0},paragraphsCount:{value:0},pagesCount:{value:0}}}}],sourceFile:"./promptbook-collection/prepare-knowledge-keywords.ptbk.md"},{title:"Prepare Title",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-title.ptbk.md",promptbookVersion:"0.61.0-26",parameters:[{name:"knowledgePieceContent",description:"The content",isInput:true,isOutput:false},{name:"title",description:"The title of the document",isInput:false,isOutput:true}],promptTemplates:[{blockType:"PROMPT_TEMPLATE",name:"knowledge",title:"Knowledge",modelRequirements:{modelVariant:"CHAT",modelName:"claude-3-opus-20240229"},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}",expectations:{words:{min:1,max:8}},dependentParameterNames:["knowledgePieceContent"],resultingParameterName:"title"}],knowledgeSources:[],knowledgePieces:[],personas:[],preparations:[{id:1,promptbookVersion:"0.61.0-26",modelUsage:{price:{value:0},input:{tokensCount:{value:0},charactersCount:{value:0},wordsCount:{value:0},sentencesCount:{value:0},linesCount:{value:0},paragraphsCount:{value:0},pagesCount:{value:0}},output:{tokensCount:{value:0},charactersCount:{value:0},wordsCount:{value:0},sentencesCount:{value:0},linesCount:{value:0},paragraphsCount:{value:0},pagesCount:{value:0}}}}],sourceFile:"./promptbook-collection/prepare-knowledge-title.ptbk.md"},{title:"Prepare Keywords",pipelineUrl:"https://promptbook.studio/promptbook/prepare-persona.ptbk.md",promptbookVersion:"0.61.0-26",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}],promptTemplates:[{blockType:"PROMPT_TEMPLATE",name:"make-model-requirements",title:"Make modelRequirements",modelRequirements:{modelVariant:"CHAT",modelName:"gpt-4-turbo"},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### Option `modelName`\n\nPick from the following models:\n\n- {availableModelNames}\n\n### Option `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### Option `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}",expectFormat:"JSON",dependentParameterNames:["availableModelNames","personaDescription"],resultingParameterName:"modelRequirements"}],knowledgeSources:[],knowledgePieces:[],personas:[],preparations:[{id:1,promptbookVersion:"0.61.0-26",modelUsage:{price:{value:0},input:{tokensCount:{value:0},charactersCount:{value:0},wordsCount:{value:0},sentencesCount:{value:0},linesCount:{value:0},paragraphsCount:{value:0},pagesCount:{value:0}},output:{tokensCount:{value:0},charactersCount:{value:0},wordsCount:{value:0},sentencesCount:{value:0},linesCount:{value:0},paragraphsCount:{value:0},pagesCount:{value:0}}}}],sourceFile:"./promptbook-collection/prepare-persona.ptbk.md"}];
751
751
 
752
752
  /**
753
753
  * This error indicates that the promptbook in a markdown format cannot be parsed into a valid promptbook object
@@ -825,7 +825,7 @@ function isValidPromptbookVersion(version) {
825
825
  if ( /* version === '1.0.0' || */version === '2.0.0' || version === '3.0.0') {
826
826
  return false;
827
827
  }
828
- // <- TODO: !!!! Check isValidPromptbookVersion against PROMPTBOOK_VERSIONS
828
+ // <- TODO: !!! Check isValidPromptbookVersion against PROMPTBOOK_VERSIONS
829
829
  return true;
830
830
  }
831
831
 
@@ -1165,12 +1165,12 @@ function validatePipeline(pipeline) {
1165
1165
  * > ex port function validatePipeline(promptbook: really_unknown): asserts promptbook is PipelineJson {
1166
1166
  */
1167
1167
  /**
1168
- * TODO: [🧠][🐣] !!!! Validate that all samples match expectations
1169
- * TODO: [🧠][🐣] !!!! Validate that knowledge is valid (non-void)
1170
- * TODO: [🧠][🐣] !!!! Validate that persona can be used only with CHAT variant
1171
- * TODO: !!!! Validate that parameter with reserved name not used RESERVED_PARAMETER_NAMES
1172
- * TODO: !!!! Validate that reserved parameter is not used as joker
1173
- * TODO: [🧠] !!! Validationg not only logic itself but imports around - files and websites and rerefenced pipelines exists
1168
+ * TODO: [🐣] !!!! Validate that all samples match expectations
1169
+ * TODO: [🐣][🐝] !!!! Validate that knowledge is valid (non-void)
1170
+ * TODO: [🐣] !!!! Validate that persona can be used only with CHAT variant
1171
+ * TODO: [🐣] !!!! Validate that parameter with reserved name not used RESERVED_PARAMETER_NAMES
1172
+ * TODO: [🐣] !!!! Validate that reserved parameter is not used as joker
1173
+ * TODO: [🧠] Validation not only logic itself but imports around - files and websites and rerefenced pipelines exists
1174
1174
  * TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
1175
1175
  */
1176
1176
 
@@ -1228,9 +1228,6 @@ function extractParameterNames(template) {
1228
1228
  }
1229
1229
  return parameterNames;
1230
1230
  }
1231
- /**
1232
- * TODO: !!!!! Rename to extractParameterNames
1233
- */
1234
1231
 
1235
1232
  /**
1236
1233
  * Unprepare just strips the preparation data of the pipeline
@@ -1871,7 +1868,7 @@ var ExpectError = /** @class */ (function (_super) {
1871
1868
  /**
1872
1869
  * Function isValidJsonString will tell you if the string is valid JSON or not
1873
1870
  */
1874
- function isValidJsonString(value /* <-[👨‍⚖️] */) {
1871
+ function isValidJsonString(value /* <- [👨‍⚖️] */) {
1875
1872
  try {
1876
1873
  JSON.parse(value);
1877
1874
  return true;
@@ -2155,9 +2152,9 @@ function isPipelinePrepared(pipeline) {
2155
2152
  * TODO: [🔼] Export via core or utils
2156
2153
  * TODO: [🧊] Pipeline can be partially prepared, this should return true ONLY if fully prepared
2157
2154
  * TODO: [🧿] Maybe do same process with same granularity and subfinctions as `preparePipeline`
2158
- * - Is context in each template
2159
- * - Are samples prepared
2160
- * - Are templates prepared
2155
+ * - [🏍] ? Is context in each template
2156
+ * - [♨] Are samples prepared
2157
+ * - [♨] Are templates prepared
2161
2158
  */
2162
2159
 
2163
2160
  /**
@@ -2488,7 +2485,7 @@ function createPipelineExecutor(options) {
2488
2485
  pipeline = rawPipeline;
2489
2486
  }
2490
2487
  else {
2491
- // TODO: !!!! This should be maybe warning in report
2488
+ // TODO: !!!!! This should be maybe warning in report
2492
2489
  console.warn(spaceTrim$1("\n Pipeline ".concat(rawPipeline.pipelineUrl || rawPipeline.sourceFile || rawPipeline.title, " is not prepared\n\n ").concat(rawPipeline.sourceFile, "\n\n It will be prepared ad-hoc before the first execution\n But it is recommended to prepare the pipeline during collection preparation\n\n @see more at https://ptbk.io/prepare-pipeline\n ")));
2493
2490
  }
2494
2491
  var pipelineExecutor = function (inputParameters, onProgress) { return __awaiter(_this, void 0, void 0, function () {
@@ -2498,7 +2495,7 @@ function createPipelineExecutor(options) {
2498
2495
  return __awaiter(this, void 0, void 0, function () {
2499
2496
  return __generator(this, function (_a) {
2500
2497
  TODO_USE(template);
2501
- return [2 /*return*/, RESERVED_PARAMETER_MISSING_VALUE /* <- TODO: !!!! Implement */];
2498
+ return [2 /*return*/, RESERVED_PARAMETER_MISSING_VALUE /* <- TODO: [🏍] Implement */];
2502
2499
  });
2503
2500
  });
2504
2501
  }
@@ -2506,7 +2503,7 @@ function createPipelineExecutor(options) {
2506
2503
  template) {
2507
2504
  return __awaiter(this, void 0, void 0, function () {
2508
2505
  return __generator(this, function (_a) {
2509
- // TODO: !!!! Implement Better - use real index and keyword search
2506
+ // TODO: [♨] Implement Better - use real index and keyword search
2510
2507
  TODO_USE(template);
2511
2508
  return [2 /*return*/, pipeline.knowledgePieces.map(function (_a) {
2512
2509
  var content = _a.content;
@@ -2519,9 +2516,9 @@ function createPipelineExecutor(options) {
2519
2516
  template) {
2520
2517
  return __awaiter(this, void 0, void 0, function () {
2521
2518
  return __generator(this, function (_a) {
2522
- // TODO: !!!! Implement Better - use real index and keyword search
2519
+ // TODO: [♨] Implement Better - use real index and keyword search
2523
2520
  TODO_USE(template);
2524
- return [2 /*return*/, RESERVED_PARAMETER_MISSING_VALUE /* <- TODO: !!!! Implement */];
2521
+ return [2 /*return*/, RESERVED_PARAMETER_MISSING_VALUE /* <- TODO: [♨] Implement */];
2525
2522
  });
2526
2523
  });
2527
2524
  }
@@ -3247,8 +3244,8 @@ function createPipelineExecutor(options) {
3247
3244
  return pipelineExecutor;
3248
3245
  }
3249
3246
  /**
3250
- * TODO: !!!! return `preparedPipeline` from execution
3251
- * TODO: !!!! `isNotPreparedWarningSupressed`
3247
+ * TODO: !!!!! return `preparedPipeline` from execution
3248
+ * TODO: !!!!! `isNotPreparedWarningSupressed`
3252
3249
  * TODO: Use isVerbose here (not only pass to `preparePipeline`)
3253
3250
  * TODO: [🪂] Use maxParallelCount here (not only pass to `preparePipeline`)
3254
3251
  * TODO: [♈] Probbably move expectations from templates to parameters
@@ -3257,7 +3254,7 @@ function createPipelineExecutor(options) {
3257
3254
  * Note: CreatePipelineExecutorOptions are just connected to PipelineExecutor so do not extract to types folder
3258
3255
  * TODO: [🧠][3] transparent = (report intermediate parameters) / opaque execution = (report only output parameters) progress reporting mode
3259
3256
  * TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
3260
- * TODO: [💷] !!!! `assertsExecutionSuccessful` should be the method of `PipelineExecutor` result
3257
+ * TODO: [🧠][💷] `assertsExecutionSuccessful` should be the method of `PipelineExecutor` result BUT maybe NOT to preserve pure JSON object
3261
3258
  */
3262
3259
 
3263
3260
  /**
@@ -3533,7 +3530,7 @@ function prepareTemplates(pipeline, options) {
3533
3530
  case 0:
3534
3531
  _a = options.maxParallelCount, maxParallelCount = _a === void 0 ? MAX_PARALLEL_COUNT : _a;
3535
3532
  promptTemplates = pipeline.promptTemplates, parameters = pipeline.parameters, knowledgePiecesCount = pipeline.knowledgePiecesCount;
3536
- // TODO: !!!! Apply samples to each template (if missing and is for the template defined)
3533
+ // TODO: !!!!!! Apply samples to each template (if missing and is for the template defined)
3537
3534
  TODO_USE(parameters);
3538
3535
  promptTemplatesPrepared = new Array(promptTemplates.length);
3539
3536
  return [4 /*yield*/, forEachAsync(promptTemplates, { maxParallelCount: maxParallelCount /* <- TODO: [🪂] When there are subtasks, this maximul limit can be broken */ }, function (template, index) { return __awaiter(_this, void 0, void 0, function () {
@@ -3563,7 +3560,7 @@ function prepareTemplates(pipeline, options) {
3563
3560
  /**
3564
3561
  * TODO: [🧠] Add context to each template (if missing)
3565
3562
  * TODO: [🧠] What is better name `prepareTemplate` or `prepareTemplateAndParameters`
3566
- * TODO: !!!!! Index the samples and maybe templates
3563
+ * TODO: [♨] !!! Prepare index the samples and maybe templates
3567
3564
  * TODO: [🔼] !!! Export via `@promptbook/core`
3568
3565
  * TODO: Write tests for `preparePipeline`
3569
3566
  * TODO: [🏏] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch
@@ -3642,7 +3639,7 @@ function preparePipeline(pipeline, options) {
3642
3639
  * TODO: Write tests for `preparePipeline`
3643
3640
  * TODO: [🏏] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch
3644
3641
  * TODO: [🧊] In future one preparation can take data from previous preparation and save tokens and time
3645
- * TODO: [🎐] !!!! Use here countTotalUsage
3642
+ * TODO: [🎐] !!!!!! Use here countTotalUsage
3646
3643
  * TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
3647
3644
  */
3648
3645
 
@@ -5955,7 +5952,6 @@ function listAllFiles(path, isRecursive) {
5955
5952
  });
5956
5953
  }
5957
5954
  /**
5958
- * TODO: !!!! [🧠] Library precompilation and do not mix markdown and json pipelines
5959
5955
  * Note: [🟢] This code should never be published outside of `@pipeline/node`
5960
5956
  */
5961
5957
 
@@ -6411,7 +6407,7 @@ var AnthropicClaudeExecutionTools = /** @class */ (function () {
6411
6407
  return AnthropicClaudeExecutionTools;
6412
6408
  }());
6413
6409
  /**
6414
- * TODO: !!!! [🍆] JSON mode
6410
+ * TODO: [🍆] JSON mode
6415
6411
  * TODO: [🧠] Maybe handle errors via transformAnthropicError (like transformAzureError)
6416
6412
  * TODO: Maybe Create some common util for callChatModel and callCompletionModel
6417
6413
  * TODO: Maybe make custom OpenaiError
@@ -7002,7 +6998,6 @@ var OpenAiExecutionTools = /** @class */ (function () {
7002
6998
  rawRequest = {
7003
6999
  input: replaceParameters(content, __assign(__assign({}, parameters), { modelName: modelName })),
7004
7000
  model: modelName,
7005
- // TODO: !!!! Test model 3 and dimensions
7006
7001
  };
7007
7002
  start = getCurrentIsoDate();
7008
7003
  if (this.options.isVerbose) {
@@ -7343,7 +7338,7 @@ function stringifyPipelineJson(pipeline) {
7343
7338
  return pipelineJsonStringified;
7344
7339
  }
7345
7340
  /**
7346
- * TODO: !!!! Not Working propperly @see https://promptbook.studio/samples/mixed-knowledge.ptbk.md
7341
+ * TODO: [🐝] Not Working propperly @see https://promptbook.studio/samples/mixed-knowledge.ptbk.md
7347
7342
  * TODO: [🧠][0] Maybe rename to `stringifyPipelineJson`, `stringifyIndexedJson`,...
7348
7343
  * TODO: [🧠] Maybe more elegant solution than replacing via regex
7349
7344
  * TODO: [🍙] Make some standart order of json properties