@promptbook/core 0.63.0-9 → 0.63.1

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.
@@ -1,6 +1,7 @@
1
1
  declare const _default: ({
2
- title: string;
3
2
  pipelineUrl: string;
3
+ sourceFile: string;
4
+ title: string;
4
5
  promptbookVersion: string;
5
6
  parameters: {
6
7
  name: string;
@@ -78,10 +79,10 @@ declare const _default: ({
78
79
  };
79
80
  };
80
81
  }[];
81
- sourceFile: string;
82
82
  } | {
83
- title: string;
84
83
  pipelineUrl: string;
84
+ sourceFile: string;
85
+ title: string;
85
86
  promptbookVersion: string;
86
87
  parameters: {
87
88
  name: string;
@@ -165,10 +166,10 @@ declare const _default: ({
165
166
  };
166
167
  };
167
168
  }[];
168
- sourceFile: string;
169
169
  } | {
170
- title: string;
171
170
  pipelineUrl: string;
171
+ sourceFile: string;
172
+ title: string;
172
173
  promptbookVersion: string;
173
174
  parameters: {
174
175
  name: string;
@@ -247,6 +248,5 @@ declare const _default: ({
247
248
  };
248
249
  };
249
250
  }[];
250
- sourceFile: string;
251
251
  })[];
252
252
  export default _default;
@@ -59,6 +59,8 @@ import { PrefixStorage } from '../storage/utils/PrefixStorage';
59
59
  import { executionReportJsonToString } from '../types/execution-report/executionReportJsonToString';
60
60
  import type { ExecutionReportStringOptions } from '../types/execution-report/ExecutionReportStringOptions';
61
61
  import { ExecutionReportStringOptionsDefaults } from '../types/execution-report/ExecutionReportStringOptions';
62
+ import { MODEL_VARIANTS } from '../types/ModelVariant';
63
+ import { EXPECTATION_UNITS } from '../types/PipelineJson/Expectations';
62
64
  export { PROMPTBOOK_VERSION };
63
65
  export { collectionToJson };
64
66
  export { createCollectionFromJson };
@@ -120,3 +122,5 @@ export { PrefixStorage };
120
122
  export { executionReportJsonToString };
121
123
  export type { ExecutionReportStringOptions };
122
124
  export { ExecutionReportStringOptionsDefaults };
125
+ export { MODEL_VARIANTS };
126
+ export { EXPECTATION_UNITS };
@@ -1,4 +1,3 @@
1
- import { PROMPTBOOK_VERSION } from '../version';
2
1
  import type { PipelineCollection } from '../collection/PipelineCollection';
3
2
  import type { Command } from '../commands/_common/types/Command';
4
3
  import type { CommandParser } from '../commands/_common/types/CommandParser';
@@ -205,7 +204,6 @@ import type { string_snake_case } from '../utils/normalization/normalizeTo_snake
205
204
  import type { really_any } from '../utils/organization/really_any';
206
205
  import type { TODO_any } from '../utils/organization/TODO_any';
207
206
  import type { string_promptbook_version } from '../version';
208
- export { PROMPTBOOK_VERSION };
209
207
  export type { PipelineCollection };
210
208
  export type { Command };
211
209
  export type { CommandParser };
@@ -7,6 +7,7 @@ import { titleToName } from '../conversion/utils/titleToName';
7
7
  import { forEachAsync } from '../execution/utils/forEachAsync';
8
8
  import { isValidJsonString } from '../formats/json/utils/isValidJsonString';
9
9
  import { extractBlock } from '../postprocessing/utils/extractBlock';
10
+ import { clonePipeline } from '../utils/clonePipeline';
10
11
  import { $currentDate } from '../utils/currentDate';
11
12
  import { deepClone } from '../utils/deepClone';
12
13
  import { deepFreeze } from '../utils/deepFreeze';
@@ -74,6 +75,7 @@ export { titleToName };
74
75
  export { forEachAsync };
75
76
  export { isValidJsonString };
76
77
  export { extractBlock };
78
+ export { clonePipeline };
77
79
  export { $currentDate };
78
80
  export { deepClone };
79
81
  export { deepFreeze };
@@ -6,6 +6,7 @@ import type { Command as Program } from 'commander';
6
6
  */
7
7
  export declare function initializeMakeCommand(program: Program): void;
8
8
  /**
9
+ * TODO: [🥃] !!! Allow `ptbk make` without llm tools
9
10
  * TODO: Maybe remove this command - "about" command should be enough?
10
11
  * TODO: [0] DRY Javascript and typescript - Maybe make ONLY typescript and for javascript just remove types
11
12
  * Note: [🟡] This code should never be published outside of `@promptbook/cli`
@@ -36,4 +36,5 @@ export declare function createLlmToolsFromEnv(options?: CreateLlmToolsFromEnvOpt
36
36
  * TODO: [🧠] Maybe pass env as argument
37
37
  * Note: [🟢] This code should never be published outside of `@promptbook/node` and `@promptbook/cli` and `@promptbook/cli`
38
38
  * TODO: [👷‍♂️] @@@ Manual about construction of llmTools
39
+ * TODO: [🥃] Allow `ptbk make` without llm tools
39
40
  */
@@ -17,4 +17,5 @@ export {};
17
17
  /**
18
18
  * Note: [🟡] This code should never be published outside of `@promptbook/cli`
19
19
  * TODO: [👷‍♂️] @@@ Manual about construction of llmTools
20
+ * TODO: [🥃] Allow `ptbk make` without llm tools
20
21
  */
@@ -18,7 +18,7 @@ export declare class MultipleLlmExecutionTools implements LlmExecutionTools {
18
18
  /**
19
19
  * Array of execution tools in order of priority
20
20
  */
21
- private llmExecutionTools;
21
+ private readonly llmExecutionTools;
22
22
  /**
23
23
  * Gets array of execution tools in order of priority
24
24
  */
@@ -10,6 +10,6 @@ export type ModelVariant = TupleToUnion<typeof MODEL_VARIANTS>;
10
10
  /**
11
11
  * @@@
12
12
  *
13
- * @private internal base for `ModelVariant` and `modelCommandParser`
13
+ * @public exported from `@promptbook/core`
14
14
  */
15
15
  export declare const MODEL_VARIANTS: readonly ["COMPLETION", "CHAT", "EMBEDDING"];
@@ -24,7 +24,7 @@ export type ExpectationUnit = TupleToUnion<typeof EXPECTATION_UNITS>;
24
24
  * Units of text measurement
25
25
  *
26
26
  * @see https://github.com/webgptorg/promptbook/discussions/30
27
- * @private internal base for `ExpectationUnit`
27
+ * @public exported from `@promptbook/core`
28
28
  */
29
29
  export declare const EXPECTATION_UNITS: readonly ["CHARACTERS", "WORDS", "SENTENCES", "LINES", "PARAGRAPHS", "PAGES"];
30
30
  /**
@@ -0,0 +1,13 @@
1
+ import type { PipelineJson } from '../types/PipelineJson/PipelineJson';
2
+ /**
3
+ * @@@
4
+ *
5
+ * Note: It is usefull @@@
6
+ *
7
+ * @param pipeline
8
+ * @public exported from `@promptbook/utils`
9
+ */
10
+ export declare function clonePipeline(pipeline: PipelineJson): PipelineJson;
11
+ /**
12
+ * TODO: [🍙] Make some standart order of json properties
13
+ */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/core",
3
- "version": "0.63.0-9",
3
+ "version": "0.63.1",
4
4
  "description": "Supercharge your use of large language models",
5
5
  "private": false,
6
6
  "sideEffects": false,
package/umd/index.umd.js CHANGED
@@ -16,7 +16,7 @@
16
16
  /**
17
17
  * The version of the Promptbook library
18
18
  */
19
- var PROMPTBOOK_VERSION = '0.63.0-8';
19
+ var PROMPTBOOK_VERSION = '0.63.0';
20
20
  // TODO: !!!! List here all the versions and annotate + put into script
21
21
 
22
22
  /*! *****************************************************************************
@@ -1631,7 +1631,7 @@
1631
1631
  });
1632
1632
  }
1633
1633
 
1634
- var PipelineCollection = [{title:"Prepare Knowledge from Markdown",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-from-markdown.ptbk.md",promptbookVersion:"0.63.0-8",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.63.0-8",usage:{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.63.0-8",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.63.0-8",usage:{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.63.0-8",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.63.0-8",usage:{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.63.0-8",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.63.0-8",usage:{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"}];
1634
+ var PipelineCollection = [{pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-from-markdown.ptbk.md",sourceFile:"./promptbook-collection/prepare-knowledge-from-markdown.ptbk.md",title:"Prepare Knowledge from Markdown",promptbookVersion:"0.63.0",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.63.0",usage:{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}}}}]},{pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-keywords.ptbk.md",sourceFile:"./promptbook-collection/prepare-knowledge-keywords.ptbk.md",title:"Prepare Keywords",promptbookVersion:"0.63.0",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.63.0",usage:{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}}}}]},{pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-title.ptbk.md",sourceFile:"./promptbook-collection/prepare-knowledge-title.ptbk.md",title:"Prepare Title",promptbookVersion:"0.63.0",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.63.0",usage:{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}}}}]},{pipelineUrl:"https://promptbook.studio/promptbook/prepare-persona.ptbk.md",sourceFile:"./promptbook-collection/prepare-persona.ptbk.md",title:"Prepare Keywords",promptbookVersion:"0.63.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}],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.63.0",usage:{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}}}}]}];
1635
1635
 
1636
1636
  var defaultDiacriticsRemovalMap = [
1637
1637
  {
@@ -2327,6 +2327,9 @@
2327
2327
  .map(function (error, i) { return "".concat(i + 1, ") **").concat(error.name || 'Error', ":** ").concat(error.message); })
2328
2328
  .join('\n')), "\n\n "); }));
2329
2329
  }
2330
+ else if (this.llmExecutionTools.length === 0) {
2331
+ throw new PipelineExecutionError("You have not provided any `LlmExecutionTools`");
2332
+ }
2330
2333
  else {
2331
2334
  throw new PipelineExecutionError(spaceTrim__default["default"](function (block) { return "\n You have not provided any `LlmExecutionTools` that support model variant \"".concat(prompt.modelRequirements.modelVariant, "\n\n Available `LlmExecutionTools`:\n ").concat(block(_this.llmExecutionTools
2332
2335
  .map(function (tools) { return "- ".concat(tools.title, " ").concat(tools.description || ''); })
@@ -4013,6 +4016,35 @@
4013
4016
  * TODO: [🧠][🥜]
4014
4017
  */
4015
4018
 
4019
+ /**
4020
+ * @@@
4021
+ *
4022
+ * Note: It is usefull @@@
4023
+ *
4024
+ * @param pipeline
4025
+ * @public exported from `@promptbook/utils`
4026
+ */
4027
+ function clonePipeline(pipeline) {
4028
+ // Note: Not using spread operator (...) because @@@
4029
+ var pipelineUrl = pipeline.pipelineUrl, sourceFile = pipeline.sourceFile, title = pipeline.title, promptbookVersion = pipeline.promptbookVersion, description = pipeline.description, parameters = pipeline.parameters, promptTemplates = pipeline.promptTemplates, knowledgeSources = pipeline.knowledgeSources, knowledgePieces = pipeline.knowledgePieces, personas = pipeline.personas, preparations = pipeline.preparations;
4030
+ return {
4031
+ pipelineUrl: pipelineUrl,
4032
+ sourceFile: sourceFile,
4033
+ title: title,
4034
+ promptbookVersion: promptbookVersion,
4035
+ description: description,
4036
+ parameters: parameters,
4037
+ promptTemplates: promptTemplates,
4038
+ knowledgeSources: knowledgeSources,
4039
+ knowledgePieces: knowledgePieces,
4040
+ personas: personas,
4041
+ preparations: preparations,
4042
+ };
4043
+ }
4044
+ /**
4045
+ * TODO: [🍙] Make some standart order of json properties
4046
+ */
4047
+
4016
4048
  /**
4017
4049
  * Prepare pipeline from string (markdown) format to JSON format
4018
4050
  *
@@ -4089,7 +4121,7 @@
4089
4121
  // ----- /Templates preparation -----
4090
4122
  // Note: Count total usage
4091
4123
  currentPreparation.usage = llmToolsWithUsage.getTotalUsage();
4092
- return [2 /*return*/, __assign(__assign({}, pipeline), { promptTemplates: promptTemplatesPrepared, knowledgeSources: knowledgeSourcesPrepared, knowledgePieces: knowledgePiecesPrepared, personas: preparedPersonas, preparations: preparations })];
4124
+ return [2 /*return*/, __assign(__assign({}, clonePipeline(pipeline)), { promptTemplates: promptTemplatesPrepared, knowledgeSources: knowledgeSourcesPrepared, knowledgePieces: knowledgePiecesPrepared, personas: preparedPersonas, preparations: preparations })];
4093
4125
  }
4094
4126
  });
4095
4127
  });
@@ -4462,7 +4494,7 @@
4462
4494
  * Units of text measurement
4463
4495
  *
4464
4496
  * @see https://github.com/webgptorg/promptbook/discussions/30
4465
- * @private internal base for `ExpectationUnit`
4497
+ * @public exported from `@promptbook/core`
4466
4498
  */
4467
4499
  var EXPECTATION_UNITS = ['CHARACTERS', 'WORDS', 'SENTENCES', 'LINES', 'PARAGRAPHS', 'PAGES'];
4468
4500
  /**
@@ -4702,7 +4734,7 @@
4702
4734
  /**
4703
4735
  * @@@
4704
4736
  *
4705
- * @private internal base for `ModelVariant` and `modelCommandParser`
4737
+ * @public exported from `@promptbook/core`
4706
4738
  */
4707
4739
  var MODEL_VARIANTS = ['COMPLETION', 'CHAT', 'EMBEDDING' /* <- TODO [🏳] */ /* <- [🤖] */];
4708
4740
 
@@ -7015,6 +7047,7 @@
7015
7047
  exports.CallbackInterfaceTools = CallbackInterfaceTools;
7016
7048
  exports.CollectionError = CollectionError;
7017
7049
  exports.EXECUTIONS_CACHE_DIRNAME = EXECUTIONS_CACHE_DIRNAME;
7050
+ exports.EXPECTATION_UNITS = EXPECTATION_UNITS;
7018
7051
  exports.EnvironmentMismatchError = EnvironmentMismatchError;
7019
7052
  exports.ExecutionReportStringOptionsDefaults = ExecutionReportStringOptionsDefaults;
7020
7053
  exports.LimitReachedError = LimitReachedError;
@@ -7023,6 +7056,7 @@
7023
7056
  exports.MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH = MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH;
7024
7057
  exports.MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL = MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL;
7025
7058
  exports.MAX_PARALLEL_COUNT = MAX_PARALLEL_COUNT;
7059
+ exports.MODEL_VARIANTS = MODEL_VARIANTS;
7026
7060
  exports.MemoryStorage = MemoryStorage;
7027
7061
  exports.NotFoundError = NotFoundError;
7028
7062
  exports.NotYetImplementedError = NotYetImplementedError;