@promptbook/core 0.69.0-11 → 0.69.0-12

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/esm/index.es.js CHANGED
@@ -11,7 +11,7 @@ import moment from 'moment';
11
11
  /**
12
12
  * The version of the Promptbook library
13
13
  */
14
- var PROMPTBOOK_VERSION = '0.69.0-10';
14
+ var PROMPTBOOK_VERSION = '0.69.0-11';
15
15
  // TODO: !!!! List here all the versions and annotate + put into script
16
16
 
17
17
  /*! *****************************************************************************
@@ -748,6 +748,19 @@ var DEFAULT_REMOTE_URL = 'https://api.pavolhejny.com/';
748
748
  */
749
749
  var DEFAULT_REMOTE_URL_PATH = '/promptbook/socket.io';
750
750
  // <- TODO: [🧜‍♂️]
751
+ /**
752
+ * @@@
753
+ *
754
+ * @public exported from `@promptbook/core`
755
+ */
756
+ var DEFAULT_CSV_SETTINGS = {
757
+ header: true,
758
+ delimiter: ',',
759
+ quoteChar: '"',
760
+ newline: '\n',
761
+ skipEmptyLines: true,
762
+ // encoding: 'utf8'
763
+ };
751
764
  /**
752
765
  * @@@
753
766
  *
@@ -1819,7 +1832,7 @@ function forEachAsync(array, options, callbackfunction) {
1819
1832
  });
1820
1833
  }
1821
1834
 
1822
- var PipelineCollection = [{title:"Prepare Knowledge from Markdown",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-from-markdown.ptbk.md",promptbookVersion:"0.69.0-10",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-10",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-10",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-10",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"}];
1835
+ var PipelineCollection = [{title:"Prepare Knowledge from Markdown",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-from-markdown.ptbk.md",promptbookVersion:"0.69.0-11",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-11",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-11",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-11",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"}];
1823
1836
 
1824
1837
  var defaultDiacriticsRemovalMap = [
1825
1838
  {
@@ -2939,41 +2952,36 @@ function TODO_USE() {
2939
2952
  var CsvFormatDefinition = {
2940
2953
  formatName: 'CSV',
2941
2954
  aliases: ['SPREADSHEET', 'TABLE'],
2942
- isValid: function (value, schema) {
2955
+ isValid: function (value, settings, schema) {
2956
+ // TODO: !!!!!! Implement CSV validation
2943
2957
  TODO_USE(value /* <- TODO: Use value here */);
2958
+ TODO_USE(settings /* <- TODO: Use settings here */);
2944
2959
  TODO_USE(schema /* <- TODO: Use schema here */);
2945
2960
  return true;
2946
2961
  },
2947
- canBeValid: function (partialValue, schema) {
2962
+ canBeValid: function (partialValue, settings, schema) {
2948
2963
  TODO_USE(partialValue /* <- TODO: Use partialValue here */);
2964
+ TODO_USE(settings /* <- TODO: Use settings here */);
2949
2965
  TODO_USE(schema /* <- TODO: Use schema here */);
2950
2966
  return true;
2951
2967
  },
2952
- heal: function (value, schema) {
2968
+ heal: function (value, settings, schema) {
2953
2969
  TODO_USE(value /* <- TODO: Use partialValue here */);
2970
+ TODO_USE(settings /* <- TODO: Use settings here */);
2954
2971
  TODO_USE(schema /* <- TODO: Use schema here */);
2955
2972
  throw new Error('Not implemented');
2956
2973
  },
2957
2974
  subvalueDefinitions: [
2958
2975
  {
2959
2976
  subvalueName: 'ROW',
2960
- mapValues: function (value, mapCallback) {
2977
+ mapValues: function (value, settings, mapCallback) {
2961
2978
  return __awaiter(this, void 0, void 0, function () {
2962
2979
  var csv, mappedData;
2963
2980
  var _this = this;
2964
2981
  return __generator(this, function (_a) {
2965
2982
  switch (_a.label) {
2966
2983
  case 0:
2967
- csv = parse(value, {
2968
- header: true,
2969
- delimiter: ',',
2970
- quoteChar: '"',
2971
- newline: '\r\n',
2972
- skipEmptyLines: true,
2973
- // encoding: 'utf8',
2974
- // <- TODO: !!!!!! DEFAULT_CSV_OPTIONS
2975
- // <- TODO: [🧠] How to define parsing options for formats, its different concept than schema
2976
- });
2984
+ csv = parse(value, settings);
2977
2985
  if (csv.errors.length !== 0) {
2978
2986
  throw new ParseError(// <- TODO: !!!!!! Split PipelineParseError and FormatParseError -> CsvParseError
2979
2987
  spaceTrim(function (block) { return "\n CSV parsing error\n\n ".concat(block(csv.errors.map(function (error) { return error.message; }).join('\n\n')), "\n "); }));
@@ -2987,25 +2995,18 @@ var CsvFormatDefinition = {
2987
2995
  _a = [__assign({}, row)];
2988
2996
  _b = {};
2989
2997
  // <- TODO: !!!!!! Dynamic new column name and position
2998
+ // <- TODO: !!!!!! Check name collisions
2990
2999
  return [4 /*yield*/, mapCallback(row, index)];
2991
3000
  case 1: return [2 /*return*/, (__assign.apply(void 0, _a.concat([(_b.newColumn =
2992
3001
  // <- TODO: !!!!!! Dynamic new column name and position
3002
+ // <- TODO: !!!!!! Check name collisions
2993
3003
  _c.sent(), _b)])))];
2994
3004
  }
2995
3005
  });
2996
3006
  }); }))];
2997
3007
  case 1:
2998
3008
  mappedData = _a.sent();
2999
- return [2 /*return*/, unparse(mappedData, {
3000
- header: true,
3001
- delimiter: ',',
3002
- quoteChar: '"',
3003
- newline: '\r\n',
3004
- skipEmptyLines: true,
3005
- // encoding: 'utf8',
3006
- // <- TODO: !!!!!! DEFAULT_CSV_OPTIONS
3007
- // <- TODO: [🧠] How to define parsing options for formats, its different concept than schema
3008
- })];
3009
+ return [2 /*return*/, unparse(mappedData, settings)];
3009
3010
  }
3010
3011
  });
3011
3012
  });
@@ -3013,23 +3014,14 @@ var CsvFormatDefinition = {
3013
3014
  },
3014
3015
  {
3015
3016
  subvalueName: 'CELL',
3016
- mapValues: function (value, mapCallback) {
3017
+ mapValues: function (value, settings, mapCallback) {
3017
3018
  return __awaiter(this, void 0, void 0, function () {
3018
3019
  var csv, mappedData;
3019
3020
  var _this = this;
3020
3021
  return __generator(this, function (_a) {
3021
3022
  switch (_a.label) {
3022
3023
  case 0:
3023
- csv = parse(value, {
3024
- header: true,
3025
- delimiter: ',',
3026
- quoteChar: '"',
3027
- newline: '\r\n',
3028
- skipEmptyLines: true,
3029
- // encoding: 'utf8',
3030
- // <- TODO: !!!!!! DEFAULT_CSV_OPTIONS
3031
- // <- TODO: [🧠] How to define parsing options for formats, its different concept than schema
3032
- });
3024
+ csv = parse(value, settings);
3033
3025
  if (csv.errors.length !== 0) {
3034
3026
  throw new ParseError(// <- TODO: !!!!!! Split PipelineParseError and FormatParseError -> CsvParseError
3035
3027
  spaceTrim(function (block) { return "\n CSV parsing error\n\n ".concat(block(csv.errors.map(function (error) { return error.message; }).join('\n\n')), "\n "); }));
@@ -3052,16 +3044,7 @@ var CsvFormatDefinition = {
3052
3044
  }); }))];
3053
3045
  case 1:
3054
3046
  mappedData = _a.sent();
3055
- return [2 /*return*/, unparse(mappedData, {
3056
- header: true,
3057
- delimiter: ',',
3058
- quoteChar: '"',
3059
- newline: '\r\n',
3060
- skipEmptyLines: true,
3061
- // encoding: 'utf8',
3062
- // <- TODO: !!!!!! DEFAULT_CSV_OPTIONS
3063
- // <- TODO: [🧠] How to define parsing options for formats, its different concept than schema
3064
- })];
3047
+ return [2 /*return*/, unparse(mappedData, settings)];
3065
3048
  }
3066
3049
  });
3067
3050
  });
@@ -3106,17 +3089,20 @@ function isValidJsonString(value /* <- [👨‍⚖️] */) {
3106
3089
  var JsonFormatDefinition = {
3107
3090
  formatName: 'JSON',
3108
3091
  mimeType: 'application/json',
3109
- isValid: function (value, schema) {
3092
+ isValid: function (value, settings, schema) {
3110
3093
  TODO_USE(schema /* <- TODO: Use schema here */);
3094
+ TODO_USE(settings /* <- TODO: Use settings here */);
3111
3095
  return isValidJsonString(value);
3112
3096
  },
3113
- canBeValid: function (partialValue, schema) {
3097
+ canBeValid: function (partialValue, settings, schema) {
3114
3098
  TODO_USE(partialValue /* <- TODO: Use partialValue here */);
3099
+ TODO_USE(settings /* <- TODO: Use settings here */);
3115
3100
  TODO_USE(schema /* <- TODO: Use schema here */);
3116
3101
  return true;
3117
3102
  },
3118
- heal: function (value, schema) {
3103
+ heal: function (value, settings, schema) {
3119
3104
  TODO_USE(value /* <- TODO: Use partialValue here */);
3105
+ TODO_USE(settings /* <- TODO: Use settings here */);
3120
3106
  TODO_USE(schema /* <- TODO: Use schema here */);
3121
3107
  throw new Error('Not implemented');
3122
3108
  },
@@ -3125,7 +3111,7 @@ var JsonFormatDefinition = {
3125
3111
  /**
3126
3112
  * TODO: [🧠] Maybe propper instance of object
3127
3113
  * TODO: [0] Make string_serialized_json
3128
- * TODO: [1] Make type for JSON Schema
3114
+ * TODO: [1] Make type for JSON Settings and Schema
3129
3115
  * TODO: [🧠] What to use for validating JSONs - JSON Schema, ZoD, typescript types/interfaces,...?
3130
3116
  * TODO: [🍓] In `JsonFormatDefinition` implement simple `isValid`
3131
3117
  * TODO: [🍓] In `JsonFormatDefinition` implement partial `canBeValid`
@@ -3155,7 +3141,7 @@ var TextFormatDefinition = {
3155
3141
  subvalueDefinitions: [
3156
3142
  {
3157
3143
  subvalueName: 'LINE',
3158
- mapValues: function (value, mapCallback) {
3144
+ mapValues: function (value, settings, mapCallback) {
3159
3145
  return __awaiter(this, void 0, void 0, function () {
3160
3146
  var lines, mappedLines;
3161
3147
  return __generator(this, function (_a) {
@@ -3181,6 +3167,7 @@ var TextFormatDefinition = {
3181
3167
  ],
3182
3168
  };
3183
3169
  /**
3170
+ * TODO: [1] Make type for XML Text and Schema
3184
3171
  * TODO: [🧠][🤠] Here should be all words, characters, lines, paragraphs, pages aviable as subvalues
3185
3172
  * TODO: [🍓] In `TextFormatDefinition` implement simple `isValid`
3186
3173
  * TODO: [🍓] In `TextFormatDefinition` implement partial `canBeValid`
@@ -3197,18 +3184,21 @@ var TextFormatDefinition = {
3197
3184
  var XmlFormatDefinition = {
3198
3185
  formatName: 'XML',
3199
3186
  mimeType: 'application/xml',
3200
- isValid: function (value, schema) {
3187
+ isValid: function (value, settings, schema) {
3201
3188
  TODO_USE(value /* <- TODO: Use value here */);
3189
+ TODO_USE(settings /* <- TODO: Use settings here */);
3202
3190
  TODO_USE(schema /* <- TODO: Use schema here */);
3203
3191
  return true;
3204
3192
  },
3205
- canBeValid: function (partialValue, schema) {
3193
+ canBeValid: function (partialValue, settings, schema) {
3206
3194
  TODO_USE(partialValue /* <- TODO: Use partialValue here */);
3195
+ TODO_USE(settings /* <- TODO: Use settings here */);
3207
3196
  TODO_USE(schema /* <- TODO: Use schema here */);
3208
3197
  return true;
3209
3198
  },
3210
- heal: function (value, schema) {
3199
+ heal: function (value, settings, schema) {
3211
3200
  TODO_USE(value /* <- TODO: Use partialValue here */);
3201
+ TODO_USE(settings /* <- TODO: Use settings here */);
3212
3202
  TODO_USE(schema /* <- TODO: Use schema here */);
3213
3203
  throw new Error('Not implemented');
3214
3204
  },
@@ -3217,7 +3207,7 @@ var XmlFormatDefinition = {
3217
3207
  /**
3218
3208
  * TODO: [🧠] Maybe propper instance of object
3219
3209
  * TODO: [0] Make string_serialized_xml
3220
- * TODO: [1] Make type for XML Schema
3210
+ * TODO: [1] Make type for XML Settings and Schema
3221
3211
  * TODO: [🧠] What to use for validating XMLs - XSD,...
3222
3212
  * TODO: [🍓] In `XmlFormatDefinition` implement simple `isValid`
3223
3213
  * TODO: [🍓] In `XmlFormatDefinition` implement partial `canBeValid`
@@ -4057,12 +4047,12 @@ function executeAttempts(options) {
4057
4047
  */
4058
4048
  function executeFormatCells(options) {
4059
4049
  return __awaiter(this, void 0, void 0, function () {
4060
- var template, jokerParameterNames, parameters, priority, pipelineIdentification, parameterValue, formatDefinition, subvalueDefinition, resultString;
4050
+ var template, jokerParameterNames, parameters, priority, pipelineIdentification, settings, parameterValue, formatDefinition, subvalueDefinition, formatSettings, resultString;
4061
4051
  var _this = this;
4062
4052
  return __generator(this, function (_a) {
4063
4053
  switch (_a.label) {
4064
4054
  case 0:
4065
- template = options.template, jokerParameterNames = options.jokerParameterNames, parameters = options.parameters, priority = options.priority, pipelineIdentification = options.pipelineIdentification;
4055
+ template = options.template, jokerParameterNames = options.jokerParameterNames, parameters = options.parameters, priority = options.priority, pipelineIdentification = options.pipelineIdentification, settings = options.settings;
4066
4056
  if (template.foreach === undefined) {
4067
4057
  return [2 /*return*/, /* not await */ executeAttempts(options)];
4068
4058
  }
@@ -4091,7 +4081,11 @@ function executeFormatCells(options) {
4091
4081
  .map(function (subvalueName) { return "- ".concat(subvalueName); })
4092
4082
  .join('\n')), "\n\n [\u26F7] This should never happen because cell name should be validated during parsing\n\n ").concat(block(pipelineIdentification), "\n "); }));
4093
4083
  }
4094
- return [4 /*yield*/, subvalueDefinition.mapValues(parameterValue, function (subparameters, index) { return __awaiter(_this, void 0, void 0, function () {
4084
+ if (formatDefinition.formatName === 'CSV') {
4085
+ formatSettings = settings.csvSettings;
4086
+ // <- TODO: !!!!!! More universal, make simmilar pattern for other formats for example \n vs \r\n in text
4087
+ }
4088
+ return [4 /*yield*/, subvalueDefinition.mapValues(parameterValue, formatSettings, function (subparameters, index) { return __awaiter(_this, void 0, void 0, function () {
4095
4089
  var mappedParameters, allSubparameters, subresultString;
4096
4090
  return __generator(this, function (_a) {
4097
4091
  switch (_a.label) {
@@ -4726,7 +4720,7 @@ function executePipeline(options) {
4726
4720
  function createPipelineExecutor(options) {
4727
4721
  var _this = this;
4728
4722
  var pipeline = options.pipeline, tools = options.tools, _a = options.settings, settings = _a === void 0 ? {} : _a;
4729
- var _b = settings.maxExecutionAttempts, maxExecutionAttempts = _b === void 0 ? MAX_EXECUTION_ATTEMPTS : _b, _c = settings.maxParallelCount, maxParallelCount = _c === void 0 ? MAX_PARALLEL_COUNT : _c, _d = settings.isVerbose, isVerbose = _d === void 0 ? IS_VERBOSE : _d, _e = settings.isNotPreparedWarningSupressed, isNotPreparedWarningSupressed = _e === void 0 ? false : _e;
4723
+ var _b = settings.maxExecutionAttempts, maxExecutionAttempts = _b === void 0 ? MAX_EXECUTION_ATTEMPTS : _b, _c = settings.maxParallelCount, maxParallelCount = _c === void 0 ? MAX_PARALLEL_COUNT : _c, _d = settings.csvSettings, csvSettings = _d === void 0 ? DEFAULT_CSV_SETTINGS : _d, _e = settings.isVerbose, isVerbose = _e === void 0 ? IS_VERBOSE : _e, _f = settings.isNotPreparedWarningSupressed, isNotPreparedWarningSupressed = _f === void 0 ? false : _f;
4730
4724
  validatePipeline(pipeline);
4731
4725
  var pipelineIdentification = (function () {
4732
4726
  // Note: This is a 😐 implementation of [🚞]
@@ -4761,6 +4755,7 @@ function createPipelineExecutor(options) {
4761
4755
  settings: {
4762
4756
  maxExecutionAttempts: maxExecutionAttempts,
4763
4757
  maxParallelCount: maxParallelCount,
4758
+ csvSettings: csvSettings,
4764
4759
  isVerbose: isVerbose,
4765
4760
  isNotPreparedWarningSupressed: isNotPreparedWarningSupressed,
4766
4761
  },
@@ -9223,5 +9218,5 @@ function executionReportJsonToString(executionReportJson, options) {
9223
9218
  * TODO: [🧠] Should be in generated file GENERATOR_WARNING
9224
9219
  */
9225
9220
 
9226
- export { $llmToolsMetadataRegister, $llmToolsRegister, CLAIM, CallbackInterfaceTools, CollectionError, CsvFormatDefinition, DEFAULT_REMOTE_URL, DEFAULT_REMOTE_URL_PATH, ERRORS, EXECUTIONS_CACHE_DIRNAME, EXPECTATION_UNITS, EnvironmentMismatchError, ExecutionReportStringOptionsDefaults, ExpectError, IS_VERBOSE, LimitReachedError, MAX_EXECUTION_ATTEMPTS, MAX_FILENAME_LENGTH, MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH, MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL, MAX_PARALLEL_COUNT, MODEL_VARIANTS, MemoryStorage, NotFoundError, NotYetImplementedError, PIPELINE_COLLECTION_BASE_FILENAME, PROMPTBOOK_VERSION, ParseError, PipelineExecutionError, PipelineLogicError, PipelineUrlError, PrefixStorage, RESERVED_PARAMETER_NAMES, TemplateTypes, TextFormatDefinition, UnexpectedError, ZERO_USAGE, _AnthropicClaudeMetadataRegistration, _AzureOpenAiMetadataRegistration, _OpenAiMetadataRegistration, addUsage, assertsExecutionSuccessful, cacheLlmTools, collectionToJson, countTotalUsage, createCollectionFromJson, createCollectionFromPromise, createCollectionFromUrl, createLlmToolsFromConfiguration, createPipelineExecutor, createSubcollection, embeddingVectorToString, executionReportJsonToString, isPassingExpectations, isPipelinePrepared, joinLlmExecutionTools, limitTotalUsage, pipelineJsonToString, pipelineStringToJson, pipelineStringToJsonSync, prepareKnowledgeFromMarkdown, prepareKnowledgePieces, preparePersona, preparePipeline, prepareTemplates, prettifyPipelineString, stringifyPipelineJson, unpreparePipeline, usageToHuman, usageToWorktime, validatePipeline };
9221
+ export { $llmToolsMetadataRegister, $llmToolsRegister, CLAIM, CallbackInterfaceTools, CollectionError, CsvFormatDefinition, DEFAULT_CSV_SETTINGS, DEFAULT_REMOTE_URL, DEFAULT_REMOTE_URL_PATH, ERRORS, EXECUTIONS_CACHE_DIRNAME, EXPECTATION_UNITS, EnvironmentMismatchError, ExecutionReportStringOptionsDefaults, ExpectError, IS_VERBOSE, LimitReachedError, MAX_EXECUTION_ATTEMPTS, MAX_FILENAME_LENGTH, MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH, MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL, MAX_PARALLEL_COUNT, MODEL_VARIANTS, MemoryStorage, NotFoundError, NotYetImplementedError, PIPELINE_COLLECTION_BASE_FILENAME, PROMPTBOOK_VERSION, ParseError, PipelineExecutionError, PipelineLogicError, PipelineUrlError, PrefixStorage, RESERVED_PARAMETER_NAMES, TemplateTypes, TextFormatDefinition, UnexpectedError, ZERO_USAGE, _AnthropicClaudeMetadataRegistration, _AzureOpenAiMetadataRegistration, _OpenAiMetadataRegistration, addUsage, assertsExecutionSuccessful, cacheLlmTools, collectionToJson, countTotalUsage, createCollectionFromJson, createCollectionFromPromise, createCollectionFromUrl, createLlmToolsFromConfiguration, createPipelineExecutor, createSubcollection, embeddingVectorToString, executionReportJsonToString, isPassingExpectations, isPipelinePrepared, joinLlmExecutionTools, limitTotalUsage, pipelineJsonToString, pipelineStringToJson, pipelineStringToJsonSync, prepareKnowledgeFromMarkdown, prepareKnowledgePieces, preparePersona, preparePipeline, prepareTemplates, prettifyPipelineString, stringifyPipelineJson, unpreparePipeline, usageToHuman, usageToWorktime, validatePipeline };
9227
9222
  //# sourceMappingURL=index.es.js.map