@promptbook/core 0.75.0-2 → 0.75.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.
- package/README.md +46 -30
- package/esm/index.es.js +246 -133
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/core.index.d.ts +16 -4
- package/esm/typings/src/_packages/types.index.d.ts +8 -6
- package/esm/typings/src/_packages/utils.index.d.ts +2 -0
- package/esm/typings/src/commands/EXPECT/ExpectCommand.d.ts +1 -1
- package/esm/typings/src/commands/SECTION/SectionCommand.d.ts +1 -1
- package/esm/typings/src/commands/_common/types/CommandParser.d.ts +0 -2
- package/esm/typings/src/config.d.ts +34 -2
- package/esm/typings/src/conversion/pipelineJsonToString.d.ts +1 -1
- package/esm/typings/src/conversion/prettify/renderPipelineMermaidOptions.d.ts +2 -2
- package/esm/typings/src/conversion/utils/extractParameterNamesFromTask.d.ts +3 -3
- package/esm/typings/src/conversion/utils/renameParameter.d.ts +2 -2
- package/esm/typings/src/dialogs/simple-prompt/SimplePromptInterfaceTools.d.ts +1 -1
- package/esm/typings/src/execution/ScriptExecutionTools.d.ts +1 -1
- package/esm/typings/src/formfactors/_boilerplate/BoilerplateFormfactorDefinition.d.ts +2 -2
- package/esm/typings/src/formfactors/_common/AbstractFormfactorDefinition.d.ts +3 -0
- package/esm/typings/src/formfactors/chatbot/ChatbotFormfactorDefinition.d.ts +32 -2
- package/esm/typings/src/formfactors/generator/GeneratorFormfactorDefinition.d.ts +14 -0
- package/esm/typings/src/formfactors/generic/GenericFormfactorDefinition.d.ts +2 -2
- package/esm/typings/src/formfactors/index.d.ts +72 -10
- package/esm/typings/src/formfactors/matcher/MatcherFormfactorDefinition.d.ts +2 -2
- package/esm/typings/src/formfactors/sheets/SheetsFormfactorDefinition.d.ts +12 -2
- package/esm/typings/src/formfactors/translator/TranslatorFormfactorDefinition.d.ts +12 -2
- package/esm/typings/src/pipeline/PipelineInterface/PipelineInterface.d.ts +5 -4
- package/esm/typings/src/pipeline/PipelineInterface/constants.d.ts +2 -2
- package/esm/typings/src/pipeline/PipelineJson/{TaskJsonCommon.d.ts → CommonTaskJson.d.ts} +13 -13
- package/esm/typings/src/pipeline/PipelineJson/DialogTaskJson.d.ts +2 -2
- package/esm/typings/src/pipeline/PipelineJson/ParameterJson.d.ts +2 -0
- package/esm/typings/src/pipeline/PipelineJson/PersonaJson.d.ts +1 -1
- package/esm/typings/src/pipeline/PipelineJson/PipelineJson.d.ts +2 -2
- package/esm/typings/src/pipeline/PipelineJson/PromptTaskJson.d.ts +2 -2
- package/esm/typings/src/pipeline/PipelineJson/ScriptTaskJson.d.ts +2 -2
- package/esm/typings/src/pipeline/PipelineJson/SimpleTaskJson.d.ts +2 -2
- package/esm/typings/src/pipeline/PipelineJson/TaskJson.d.ts +1 -1
- package/esm/typings/src/pipeline/PipelineString.d.ts +1 -1
- package/esm/typings/src/prepare/isPipelinePrepared.d.ts +1 -1
- package/esm/typings/src/prepare/prepareTasks.d.ts +5 -5
- package/esm/typings/src/types/Prompt.d.ts +3 -3
- package/esm/typings/src/types/SectionType.d.ts +21 -0
- package/esm/typings/src/types/TaskProgress.d.ts +1 -1
- package/esm/typings/src/types/TaskType.d.ts +15 -0
- package/esm/typings/src/types/typeAliases.d.ts +1 -1
- package/esm/typings/src/utils/organization/TODO_remove_as.d.ts +6 -0
- package/esm/typings/src/utils/organization/spaceTrim.d.ts +11 -0
- package/esm/typings/src/utils/parameters/extractParameterNames.d.ts +1 -1
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/umd/index.umd.js +252 -132
- package/umd/index.umd.js.map +1 -1
- package/esm/typings/src/commands/SECTION/SectionType.d.ts +0 -13
- /package/esm/typings/{promptbook-collection → books}/index.d.ts +0 -0
package/esm/index.es.js
CHANGED
|
@@ -22,7 +22,7 @@ var BOOK_LANGUAGE_VERSION = '1.0.0';
|
|
|
22
22
|
*
|
|
23
23
|
* @see https://github.com/webgptorg/promptbook
|
|
24
24
|
*/
|
|
25
|
-
var PROMPTBOOK_ENGINE_VERSION = '0.75.0
|
|
25
|
+
var PROMPTBOOK_ENGINE_VERSION = '0.75.0';
|
|
26
26
|
/**
|
|
27
27
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
28
28
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -247,7 +247,7 @@ function pipelineJsonToString(pipelineJson) {
|
|
|
247
247
|
return isInput;
|
|
248
248
|
})), _h = _g.next(); !_h.done; _h = _g.next()) {
|
|
249
249
|
var parameter = _h.value;
|
|
250
|
-
commands.push("INPUT PARAMETER ".concat(
|
|
250
|
+
commands.push("INPUT PARAMETER ".concat(taskParameterJsonToString(parameter)));
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
253
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
@@ -263,7 +263,7 @@ function pipelineJsonToString(pipelineJson) {
|
|
|
263
263
|
return isOutput;
|
|
264
264
|
})), _k = _j.next(); !_k.done; _k = _j.next()) {
|
|
265
265
|
var parameter = _k.value;
|
|
266
|
-
commands.push("OUTPUT PARAMETER ".concat(
|
|
266
|
+
commands.push("OUTPUT PARAMETER ".concat(taskParameterJsonToString(parameter)));
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
269
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
@@ -277,12 +277,12 @@ function pipelineJsonToString(pipelineJson) {
|
|
|
277
277
|
pipelineString += commands.map(function (command) { return "- ".concat(command); }).join('\n');
|
|
278
278
|
try {
|
|
279
279
|
for (var tasks_1 = __values(tasks), tasks_1_1 = tasks_1.next(); !tasks_1_1.done; tasks_1_1 = tasks_1.next()) {
|
|
280
|
-
var
|
|
280
|
+
var task = tasks_1_1.value;
|
|
281
281
|
var
|
|
282
282
|
/* Note: Not using:> name, */
|
|
283
|
-
title_1 =
|
|
283
|
+
title_1 = task.title, description_1 = task.description,
|
|
284
284
|
/* Note: dependentParameterNames, */
|
|
285
|
-
jokers =
|
|
285
|
+
jokers = task.jokerParameterNames, taskType = task.taskType, content = task.content, postprocessing = task.postprocessingFunctionNames, expectations = task.expectations, format = task.format, resultingParameterName = task.resultingParameterName;
|
|
286
286
|
pipelineString += '\n\n';
|
|
287
287
|
pipelineString += "## ".concat(title_1);
|
|
288
288
|
if (description_1) {
|
|
@@ -292,9 +292,10 @@ function pipelineJsonToString(pipelineJson) {
|
|
|
292
292
|
var commands_1 = [];
|
|
293
293
|
var contentLanguage = 'text';
|
|
294
294
|
if (taskType === 'PROMPT_TASK') {
|
|
295
|
-
var modelRequirements =
|
|
295
|
+
var modelRequirements = task.modelRequirements;
|
|
296
296
|
var _l = modelRequirements || {}, modelName = _l.modelName, modelVariant = _l.modelVariant;
|
|
297
|
-
|
|
297
|
+
// Note: Do nothing, it is default
|
|
298
|
+
// commands.push(`PROMPT`);
|
|
298
299
|
if (modelVariant) {
|
|
299
300
|
commands_1.push("MODEL VARIANT ".concat(capitalize(modelVariant)));
|
|
300
301
|
}
|
|
@@ -307,16 +308,16 @@ function pipelineJsonToString(pipelineJson) {
|
|
|
307
308
|
// Note: Nothing special here
|
|
308
309
|
}
|
|
309
310
|
else if (taskType === 'SCRIPT_TASK') {
|
|
310
|
-
commands_1.push("SCRIPT
|
|
311
|
-
if (
|
|
312
|
-
contentLanguage =
|
|
311
|
+
commands_1.push("SCRIPT");
|
|
312
|
+
if (task.contentLanguage) {
|
|
313
|
+
contentLanguage = task.contentLanguage;
|
|
313
314
|
}
|
|
314
315
|
else {
|
|
315
316
|
contentLanguage = '';
|
|
316
317
|
}
|
|
317
318
|
}
|
|
318
319
|
else if (taskType === 'DIALOG_TASK') {
|
|
319
|
-
commands_1.push("DIALOG
|
|
320
|
+
commands_1.push("DIALOG");
|
|
320
321
|
// Note: Nothing special here
|
|
321
322
|
} // <- }else if([🅱]
|
|
322
323
|
if (jokers) {
|
|
@@ -391,7 +392,7 @@ function pipelineJsonToString(pipelineJson) {
|
|
|
391
392
|
pipelineString += '\n';
|
|
392
393
|
pipelineString += '```';
|
|
393
394
|
pipelineString += '\n\n';
|
|
394
|
-
pipelineString += "`-> {".concat(resultingParameterName, "}`"); // <- TODO: [main] !!! If the parameter here has description, add it and use
|
|
395
|
+
pipelineString += "`-> {".concat(resultingParameterName, "}`"); // <- TODO: [main] !!! If the parameter here has description, add it and use taskParameterJsonToString
|
|
395
396
|
}
|
|
396
397
|
}
|
|
397
398
|
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
@@ -406,8 +407,8 @@ function pipelineJsonToString(pipelineJson) {
|
|
|
406
407
|
/**
|
|
407
408
|
* @private internal utility of `pipelineJsonToString`
|
|
408
409
|
*/
|
|
409
|
-
function
|
|
410
|
-
var name =
|
|
410
|
+
function taskParameterJsonToString(taskParameterJson) {
|
|
411
|
+
var name = taskParameterJson.name, description = taskParameterJson.description;
|
|
411
412
|
var parameterString = "{".concat(name, "}");
|
|
412
413
|
if (description) {
|
|
413
414
|
parameterString = "".concat(parameterString, " ").concat(description);
|
|
@@ -415,7 +416,7 @@ function templateParameterJsonToString(templateParameterJson) {
|
|
|
415
416
|
return parameterString;
|
|
416
417
|
}
|
|
417
418
|
/**
|
|
418
|
-
* TODO: [🛋] Implement new features and commands into `pipelineJsonToString` + `
|
|
419
|
+
* TODO: [🛋] Implement new features and commands into `pipelineJsonToString` + `taskParameterJsonToString` , use `stringifyCommand`
|
|
419
420
|
* TODO: [🧠] Is there a way to auto-detect missing features in pipelineJsonToString
|
|
420
421
|
* TODO: [🏛] Maybe make some markdown builder
|
|
421
422
|
* TODO: [🏛] Escape all
|
|
@@ -641,6 +642,14 @@ function $asDeeplyFrozenSerializableJson(name, objectValue) {
|
|
|
641
642
|
* @private within the repository
|
|
642
643
|
*/
|
|
643
644
|
var GENERATOR_WARNING = "\u26A0\uFE0F WARNING: This code has been generated so that any manual changes will be overwritten";
|
|
645
|
+
/**
|
|
646
|
+
* Name for the Promptbook
|
|
647
|
+
*
|
|
648
|
+
* TODO: [🗽] Unite branding and make single place for it
|
|
649
|
+
*
|
|
650
|
+
* @public exported from `@promptbook/core`
|
|
651
|
+
*/
|
|
652
|
+
var NAME = "Promptbook";
|
|
644
653
|
/**
|
|
645
654
|
* Claim for the Promptbook
|
|
646
655
|
*
|
|
@@ -650,6 +659,22 @@ var GENERATOR_WARNING = "\u26A0\uFE0F WARNING: This code has been generated so t
|
|
|
650
659
|
*/
|
|
651
660
|
var CLAIM = "It's time for a paradigm shift. The future of software in plain English, French or Latin";
|
|
652
661
|
// <- TODO: [🐊] Pick the best claim
|
|
662
|
+
/**
|
|
663
|
+
* Logo for the light theme
|
|
664
|
+
*
|
|
665
|
+
* TODO: [🗽] Unite branding and make single place for it
|
|
666
|
+
*
|
|
667
|
+
* @public exported from `@promptbook/core`
|
|
668
|
+
*/
|
|
669
|
+
var LOGO_LIGHT_SRC = "https://promptbook.studio/_next/static/media/promptbook-logo.b21f0c70.png";
|
|
670
|
+
/**
|
|
671
|
+
* Logo for the dark theme
|
|
672
|
+
*
|
|
673
|
+
* TODO: [🗽] Unite branding and make single place for it
|
|
674
|
+
*
|
|
675
|
+
* @public exported from `@promptbook/core`
|
|
676
|
+
*/
|
|
677
|
+
var LOGO_DARK_SRC = "https://promptbook.studio/_next/static/media/promptbook-logo-white.09887cbc.png";
|
|
653
678
|
/**
|
|
654
679
|
* When the title is not provided, the default title is used
|
|
655
680
|
*
|
|
@@ -708,6 +733,13 @@ var DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH = 3;
|
|
|
708
733
|
* @public exported from `@promptbook/core`
|
|
709
734
|
*/
|
|
710
735
|
var DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL = 200;
|
|
736
|
+
/**
|
|
737
|
+
* Where to store your books
|
|
738
|
+
* This is kind of a "src" for your books
|
|
739
|
+
*
|
|
740
|
+
* @public exported from `@promptbook/core`
|
|
741
|
+
*/
|
|
742
|
+
var DEFAULT_BOOKS_DIRNAME = './books';
|
|
711
743
|
/**
|
|
712
744
|
* Where to store the cache of executions for promptbook CLI
|
|
713
745
|
*
|
|
@@ -715,7 +747,7 @@ var DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL = 200;
|
|
|
715
747
|
*
|
|
716
748
|
* @public exported from `@promptbook/core`
|
|
717
749
|
*/
|
|
718
|
-
var DEFAULT_EXECUTIONS_CACHE_DIRNAME = '
|
|
750
|
+
var DEFAULT_EXECUTIONS_CACHE_DIRNAME = './.promptbook/executions-cache';
|
|
719
751
|
/**
|
|
720
752
|
* Where to store the scrape cache
|
|
721
753
|
*
|
|
@@ -723,7 +755,7 @@ var DEFAULT_EXECUTIONS_CACHE_DIRNAME = '/.promptbook/executions-cache';
|
|
|
723
755
|
*
|
|
724
756
|
* @public exported from `@promptbook/core`
|
|
725
757
|
*/
|
|
726
|
-
var DEFAULT_SCRAPE_CACHE_DIRNAME = '
|
|
758
|
+
var DEFAULT_SCRAPE_CACHE_DIRNAME = './.promptbook/scrape-cache';
|
|
727
759
|
/**
|
|
728
760
|
* The name of the builded pipeline collection made by CLI `ptbk make` and for lookup in `createCollectionFromDirectory`
|
|
729
761
|
*
|
|
@@ -1215,20 +1247,20 @@ function validatePipelineCore(pipeline) {
|
|
|
1215
1247
|
}
|
|
1216
1248
|
finally { if (e_3) throw e_3.error; }
|
|
1217
1249
|
}
|
|
1218
|
-
var
|
|
1250
|
+
var unresovedTasks = __spreadArray([], __read(pipeline.tasks), false);
|
|
1219
1251
|
var loopLimit = LOOP_LIMIT;
|
|
1220
1252
|
var _loop_3 = function () {
|
|
1221
1253
|
if (loopLimit-- < 0) {
|
|
1222
1254
|
// Note: Really UnexpectedError not LimitReachedError - this should not happen and be caught below
|
|
1223
1255
|
throw new UnexpectedError(spaceTrim$1(function (block) { return "\n Loop limit reached during detection of circular dependencies in `validatePipeline`\n\n ".concat(block(pipelineIdentification), "\n "); }));
|
|
1224
1256
|
}
|
|
1225
|
-
var
|
|
1257
|
+
var currentlyResovedTasks = unresovedTasks.filter(function (task) {
|
|
1226
1258
|
return task.dependentParameterNames.every(function (name) { return resovedParameters.includes(name); });
|
|
1227
1259
|
});
|
|
1228
|
-
if (
|
|
1260
|
+
if (currentlyResovedTasks.length === 0) {
|
|
1229
1261
|
throw new PipelineLogicError(
|
|
1230
1262
|
// TODO: [🐎] DRY
|
|
1231
|
-
spaceTrim$1(function (block) { return "\n\n Can not resolve some parameters:\n Either you are using a parameter that is not defined, or there are some circular dependencies.\n\n ".concat(block(pipelineIdentification), "\n\n **Can not resolve:**\n ").concat(block(
|
|
1263
|
+
spaceTrim$1(function (block) { return "\n\n Can not resolve some parameters:\n Either you are using a parameter that is not defined, or there are some circular dependencies.\n\n ".concat(block(pipelineIdentification), "\n\n **Can not resolve:**\n ").concat(block(unresovedTasks
|
|
1232
1264
|
.map(function (_a) {
|
|
1233
1265
|
var resultingParameterName = _a.resultingParameterName, dependentParameterNames = _a.dependentParameterNames;
|
|
1234
1266
|
return "- Parameter `{".concat(resultingParameterName, "}` which depends on ").concat(dependentParameterNames
|
|
@@ -1247,13 +1279,13 @@ function validatePipelineCore(pipeline) {
|
|
|
1247
1279
|
.map(function (name) { return "- Parameter `{".concat(name, "}`"); })
|
|
1248
1280
|
.join('\n')), "\n\n\n "); }));
|
|
1249
1281
|
}
|
|
1250
|
-
resovedParameters = __spreadArray(__spreadArray([], __read(resovedParameters), false), __read(
|
|
1282
|
+
resovedParameters = __spreadArray(__spreadArray([], __read(resovedParameters), false), __read(currentlyResovedTasks.map(function (_a) {
|
|
1251
1283
|
var resultingParameterName = _a.resultingParameterName;
|
|
1252
1284
|
return resultingParameterName;
|
|
1253
1285
|
})), false);
|
|
1254
|
-
|
|
1286
|
+
unresovedTasks = unresovedTasks.filter(function (task) { return !currentlyResovedTasks.includes(task); });
|
|
1255
1287
|
};
|
|
1256
|
-
while (
|
|
1288
|
+
while (unresovedTasks.length > 0) {
|
|
1257
1289
|
_loop_3();
|
|
1258
1290
|
}
|
|
1259
1291
|
// TODO: !!!!!! Test that pipeline interface implements declared formfactor interface
|
|
@@ -1315,7 +1347,7 @@ var PipelineUrlError = /** @class */ (function (_super) {
|
|
|
1315
1347
|
/**
|
|
1316
1348
|
* Parses the task and returns the list of all parameter names
|
|
1317
1349
|
*
|
|
1318
|
-
* @param template the
|
|
1350
|
+
* @param template the string template with parameters in {curly} braces
|
|
1319
1351
|
* @returns the list of parameter names
|
|
1320
1352
|
* @public exported from `@promptbook/utils`
|
|
1321
1353
|
*/
|
|
@@ -1349,13 +1381,13 @@ function unpreparePipeline(pipeline) {
|
|
|
1349
1381
|
var personas = pipeline.personas, knowledgeSources = pipeline.knowledgeSources, tasks = pipeline.tasks;
|
|
1350
1382
|
personas = personas.map(function (persona) { return (__assign(__assign({}, persona), { modelRequirements: undefined, preparationIds: undefined })); });
|
|
1351
1383
|
knowledgeSources = knowledgeSources.map(function (knowledgeSource) { return (__assign(__assign({}, knowledgeSource), { preparationIds: undefined })); });
|
|
1352
|
-
tasks = tasks.map(function (
|
|
1353
|
-
var dependentParameterNames =
|
|
1354
|
-
var parameterNames = extractParameterNames(
|
|
1384
|
+
tasks = tasks.map(function (task) {
|
|
1385
|
+
var dependentParameterNames = task.dependentParameterNames;
|
|
1386
|
+
var parameterNames = extractParameterNames(task.preparedContent || '');
|
|
1355
1387
|
dependentParameterNames = dependentParameterNames.filter(function (dependentParameterName) { return !parameterNames.has(dependentParameterName); });
|
|
1356
|
-
var
|
|
1357
|
-
delete
|
|
1358
|
-
return
|
|
1388
|
+
var taskUnprepared = __assign(__assign({}, task), { dependentParameterNames: dependentParameterNames });
|
|
1389
|
+
delete taskUnprepared.preparedContent;
|
|
1390
|
+
return taskUnprepared;
|
|
1359
1391
|
});
|
|
1360
1392
|
return $asDeeplyFrozenSerializableJson('Unprepared PipelineJson', __assign(__assign({}, pipeline), { tasks: tasks, knowledgeSources: knowledgeSources, knowledgePieces: [], personas: personas, preparations: [] }));
|
|
1361
1393
|
}
|
|
@@ -1672,24 +1704,6 @@ function createSubcollection(collection, predicate) {
|
|
|
1672
1704
|
};
|
|
1673
1705
|
}
|
|
1674
1706
|
|
|
1675
|
-
/**
|
|
1676
|
-
* Section type describes the way how the section is sectiond
|
|
1677
|
-
*
|
|
1678
|
-
* @public exported from `@promptbook/core`
|
|
1679
|
-
*/
|
|
1680
|
-
var SectionTypes = [
|
|
1681
|
-
'PROMPT_TASK',
|
|
1682
|
-
'SIMPLE_TASK',
|
|
1683
|
-
'SCRIPT_TASK',
|
|
1684
|
-
'DIALOG_TASK',
|
|
1685
|
-
'EXAMPLE',
|
|
1686
|
-
'KNOWLEDGE',
|
|
1687
|
-
'INSTRUMENT',
|
|
1688
|
-
'ACTION',
|
|
1689
|
-
// <- [🅱]
|
|
1690
|
-
];
|
|
1691
|
-
// <- TODO: !!!!!! Make alongside `SectionType` the `TaskType`, `TaskType` + [⛱] and ACRY
|
|
1692
|
-
|
|
1693
1707
|
/**
|
|
1694
1708
|
* This error type indicates that some tools are missing for pipeline execution or preparation
|
|
1695
1709
|
*
|
|
@@ -2328,7 +2342,7 @@ function joinLlmExecutionTools() {
|
|
|
2328
2342
|
* TODO: [👷♂️] @@@ Manual about construction of llmTools
|
|
2329
2343
|
*/
|
|
2330
2344
|
|
|
2331
|
-
var PipelineCollection = [{title:"Prepare Knowledge from Markdown",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-from-markdown.book.md",formfactorName:"GENERIC",parameters:[{name:"knowledgeContent",description:"Markdown document content",isInput:true,isOutput:false},{name:"knowledgePieces",description:"The knowledge JSON object",isInput:false,isOutput:true}],tasks:[{taskType:"PROMPT_TASK",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:"./
|
|
2345
|
+
var PipelineCollection = [{title:"Prepare Knowledge from Markdown",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-from-markdown.book.md",formfactorName:"GENERIC",parameters:[{name:"knowledgeContent",description:"Markdown document content",isInput:true,isOutput:false},{name:"knowledgePieces",description:"The knowledge JSON object",isInput:false,isOutput:true}],tasks:[{taskType:"PROMPT_TASK",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:"./books/prepare-knowledge-from-markdown.book.md"},{title:"Prepare Keywords",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-keywords.book.md",formfactorName:"GENERIC",parameters:[{name:"knowledgePieceContent",description:"The content",isInput:true,isOutput:false},{name:"keywords",description:"Keywords separated by comma",isInput:false,isOutput:true}],tasks:[{taskType:"PROMPT_TASK",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:"./books/prepare-knowledge-keywords.book.md"},{title:"Prepare Title",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-title.book.md",formfactorName:"GENERIC",parameters:[{name:"knowledgePieceContent",description:"The content",isInput:true,isOutput:false},{name:"title",description:"The title of the document",isInput:false,isOutput:true}],tasks:[{taskType:"PROMPT_TASK",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:"./books/prepare-knowledge-title.book.md"},{title:"Prepare Keywords",pipelineUrl:"https://promptbook.studio/promptbook/prepare-persona.book.md",formfactorName:"GENERIC",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}],tasks:[{taskType:"PROMPT_TASK",name:"make-model-requirements",title:"Make modelRequirements",content:"You are experienced AI engineer, you need to create virtual assistant.\nWrite\n\n## Example\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:"./books/prepare-persona.book.md"}];
|
|
2332
2346
|
|
|
2333
2347
|
/**
|
|
2334
2348
|
* This error indicates that the pipeline collection cannot be propperly loaded
|
|
@@ -2508,7 +2522,7 @@ function isPipelinePrepared(pipeline) {
|
|
|
2508
2522
|
* TODO: [🐠] Maybe base this on `makeValidator`
|
|
2509
2523
|
* TODO: [🧊] Pipeline can be partially prepared, this should return true ONLY if fully prepared
|
|
2510
2524
|
* TODO: [🧿] Maybe do same process with same granularity and subfinctions as `preparePipeline`
|
|
2511
|
-
* - [🏍] ? Is context in each
|
|
2525
|
+
* - [🏍] ? Is context in each task
|
|
2512
2526
|
* - [♨] Are examples prepared
|
|
2513
2527
|
* - [♨] Are tasks prepared
|
|
2514
2528
|
*/
|
|
@@ -2580,16 +2594,16 @@ function extractVariables(script) {
|
|
|
2580
2594
|
*/
|
|
2581
2595
|
|
|
2582
2596
|
/**
|
|
2583
|
-
* Parses the
|
|
2597
|
+
* Parses the task and returns the set of all used parameters
|
|
2584
2598
|
*
|
|
2585
|
-
* @param
|
|
2599
|
+
* @param task the task with used parameters
|
|
2586
2600
|
* @returns the set of parameter names
|
|
2587
2601
|
* @throws {ParseError} if the script is invalid
|
|
2588
2602
|
* @public exported from `@promptbook/utils`
|
|
2589
2603
|
*/
|
|
2590
|
-
function extractParameterNamesFromTask(
|
|
2604
|
+
function extractParameterNamesFromTask(task) {
|
|
2591
2605
|
var e_1, _a, e_2, _b, e_3, _c, e_4, _d;
|
|
2592
|
-
var title =
|
|
2606
|
+
var title = task.title, description = task.description, taskType = task.taskType, content = task.content, preparedContent = task.preparedContent, jokerParameterNames = task.jokerParameterNames, foreach = task.foreach;
|
|
2593
2607
|
var parameterNames = new Set();
|
|
2594
2608
|
try {
|
|
2595
2609
|
for (var _e = __values(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(extractParameterNames(title)), false), __read(extractParameterNames(description || '')), false), __read(extractParameterNames(content)), false), __read(extractParameterNames(preparedContent || '')), false)), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
@@ -5656,10 +5670,10 @@ function prepareTasks(pipeline, tools, options) {
|
|
|
5656
5670
|
_a = options.maxParallelCount, maxParallelCount = _a === void 0 ? DEFAULT_MAX_PARALLEL_COUNT : _a;
|
|
5657
5671
|
tasks = pipeline.tasks, pipeline.parameters, knowledgePiecesCount = pipeline.knowledgePiecesCount;
|
|
5658
5672
|
tasksPrepared = new Array(tasks.length);
|
|
5659
|
-
return [4 /*yield*/, forEachAsync(tasks, { maxParallelCount: maxParallelCount /* <- TODO: [🪂] When there are subtasks, this maximul limit can be broken */ }, function (
|
|
5660
|
-
var dependentParameterNames, preparedContent,
|
|
5673
|
+
return [4 /*yield*/, forEachAsync(tasks, { maxParallelCount: maxParallelCount /* <- TODO: [🪂] When there are subtasks, this maximul limit can be broken */ }, function (task, index) { return __awaiter(_this, void 0, void 0, function () {
|
|
5674
|
+
var dependentParameterNames, preparedContent, preparedTask;
|
|
5661
5675
|
return __generator(this, function (_a) {
|
|
5662
|
-
dependentParameterNames =
|
|
5676
|
+
dependentParameterNames = task.dependentParameterNames;
|
|
5663
5677
|
preparedContent = undefined;
|
|
5664
5678
|
if (knowledgePiecesCount > 0 && !dependentParameterNames.includes('knowledge')) {
|
|
5665
5679
|
preparedContent = spaceTrim$1("\n {content}\n\n ## Knowledge\n\n {knowledge}\n ");
|
|
@@ -5668,8 +5682,8 @@ function prepareTasks(pipeline, tools, options) {
|
|
|
5668
5682
|
'knowledge',
|
|
5669
5683
|
], false);
|
|
5670
5684
|
}
|
|
5671
|
-
|
|
5672
|
-
tasksPrepared[index] =
|
|
5685
|
+
preparedTask = __assign(__assign({}, task), { dependentParameterNames: dependentParameterNames, preparedContent: preparedContent });
|
|
5686
|
+
tasksPrepared[index] = preparedTask;
|
|
5673
5687
|
return [2 /*return*/];
|
|
5674
5688
|
});
|
|
5675
5689
|
}); })];
|
|
@@ -5681,8 +5695,8 @@ function prepareTasks(pipeline, tools, options) {
|
|
|
5681
5695
|
});
|
|
5682
5696
|
}
|
|
5683
5697
|
/**
|
|
5684
|
-
* TODO: [🧠] Add context to each
|
|
5685
|
-
* TODO: [🧠] What is better name `
|
|
5698
|
+
* TODO: [🧠] Add context to each task (if missing)
|
|
5699
|
+
* TODO: [🧠] What is better name `prepareTask` or `prepareTaskAndParameters`
|
|
5686
5700
|
* TODO: [♨][main] !!! Prepare index the examples and maybe tasks
|
|
5687
5701
|
* TODO: Write tests for `preparePipeline`
|
|
5688
5702
|
* TODO: [🏏] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch
|
|
@@ -5768,7 +5782,7 @@ function preparePipeline(pipeline, tools, options) {
|
|
|
5768
5782
|
})];
|
|
5769
5783
|
case 3:
|
|
5770
5784
|
tasksPrepared = (_c.sent()).tasksPrepared;
|
|
5771
|
-
// ----- /
|
|
5785
|
+
// ----- /Tasks preparation -----
|
|
5772
5786
|
// Note: Count total usage
|
|
5773
5787
|
currentPreparation.usage = llmToolsWithUsage.getTotalUsage();
|
|
5774
5788
|
return [2 /*return*/, $asDeeplyFrozenSerializableJson('Prepared PipelineJson', __assign(__assign({}, clonePipeline(pipeline)), { tasks: __spreadArray([], __read(tasksPrepared), false),
|
|
@@ -5787,6 +5801,40 @@ function preparePipeline(pipeline, tools, options) {
|
|
|
5787
5801
|
* @see https://docs.anthropic.com/en/docs/test-and-evaluate/strengthen-guardrails/increase-consistency#specify-the-desired-output-format
|
|
5788
5802
|
*/
|
|
5789
5803
|
|
|
5804
|
+
/**
|
|
5805
|
+
* All available task types
|
|
5806
|
+
*
|
|
5807
|
+
* There is is distinction between task types and section types
|
|
5808
|
+
* - Every section in markdown has its SectionType
|
|
5809
|
+
* - Some sections are tasks but other can be non-task sections
|
|
5810
|
+
*
|
|
5811
|
+
* @public exported from `@promptbook/core`
|
|
5812
|
+
*/
|
|
5813
|
+
var TaskTypes = [
|
|
5814
|
+
'PROMPT',
|
|
5815
|
+
'SIMPLE',
|
|
5816
|
+
'SCRIPT',
|
|
5817
|
+
'DIALOG',
|
|
5818
|
+
// <- [🅱]
|
|
5819
|
+
];
|
|
5820
|
+
|
|
5821
|
+
/**
|
|
5822
|
+
* All available sections which are not tasks
|
|
5823
|
+
*
|
|
5824
|
+
* @public exported from `@promptbook/core`
|
|
5825
|
+
*/
|
|
5826
|
+
var NonTaskSectionTypes = ['EXAMPLE', 'KNOWLEDGE', 'INSTRUMENT', 'ACTION'];
|
|
5827
|
+
/**
|
|
5828
|
+
* All available section types
|
|
5829
|
+
*
|
|
5830
|
+
* There is is distinction between task types and section types
|
|
5831
|
+
* - Every section in markdown has its SectionType
|
|
5832
|
+
* - Some sections are tasks but other can be non-task sections
|
|
5833
|
+
*
|
|
5834
|
+
* @public exported from `@promptbook/core`
|
|
5835
|
+
*/
|
|
5836
|
+
var SectionTypes = __spreadArray(__spreadArray([], __read(TaskTypes.map(function (TaskType) { return "".concat(TaskType, "_TASK"); })), false), __read(NonTaskSectionTypes), false);
|
|
5837
|
+
|
|
5790
5838
|
/**
|
|
5791
5839
|
* Parses the knowledge command
|
|
5792
5840
|
*
|
|
@@ -5966,7 +6014,10 @@ var sectionCommandParser = {
|
|
|
5966
6014
|
var normalized = input.normalized;
|
|
5967
6015
|
normalized = normalized.split('SAMPLE').join('EXAMPLE');
|
|
5968
6016
|
normalized = normalized.split('EXECUTE_').join('');
|
|
5969
|
-
|
|
6017
|
+
normalized = normalized.split('DIALOGUE').join('DIALOG');
|
|
6018
|
+
var taskTypes = SectionTypes.filter(function (sectionType) {
|
|
6019
|
+
return normalized.includes(sectionType.split('_TASK').join(''));
|
|
6020
|
+
});
|
|
5970
6021
|
if (taskTypes.length !== 1) {
|
|
5971
6022
|
throw new ParseError(spaceTrim(function (block) { return "\n Unknown section type \"".concat(normalized, "\"\n\n Supported section types are:\n ").concat(block(SectionTypes.join(', ')), "\n "); }));
|
|
5972
6023
|
}
|
|
@@ -6325,7 +6376,7 @@ var expectCommandParser = {
|
|
|
6325
6376
|
/**
|
|
6326
6377
|
* Description of the FORMAT command
|
|
6327
6378
|
*/
|
|
6328
|
-
description: spaceTrim("\n Expect command describes the desired output of the
|
|
6379
|
+
description: spaceTrim("\n Expect command describes the desired output of the task *(after post-processing)*\n It can set limits for the maximum/minimum length of the output, measured in characters, words, sentences, paragraphs or some other shape of the output.\n "),
|
|
6329
6380
|
/**
|
|
6330
6381
|
* Link to documentation
|
|
6331
6382
|
*/
|
|
@@ -6811,7 +6862,7 @@ var formatCommandParser = {
|
|
|
6811
6862
|
/**
|
|
6812
6863
|
* Description of the FORMAT command
|
|
6813
6864
|
*/
|
|
6814
|
-
description: spaceTrim("\n Format command describes the desired output of the
|
|
6865
|
+
description: spaceTrim("\n Format command describes the desired output of the task (after post-processing)\n It can set limits for the maximum/minimum length of the output, measured in characters, words, sentences, paragraphs or some other shape of the output.\n "),
|
|
6815
6866
|
/**
|
|
6816
6867
|
* Link to documentation
|
|
6817
6868
|
*/
|
|
@@ -6875,19 +6926,45 @@ var ChatbotFormfactorDefinition = {
|
|
|
6875
6926
|
description: "@@@",
|
|
6876
6927
|
documentationUrl: "https://github.com/webgptorg/promptbook/discussions/174",
|
|
6877
6928
|
pipelineInterface: {
|
|
6878
|
-
|
|
6879
|
-
|
|
6880
|
-
|
|
6881
|
-
|
|
6882
|
-
|
|
6883
|
-
|
|
6884
|
-
|
|
6885
|
-
|
|
6886
|
-
|
|
6887
|
-
|
|
6888
|
-
|
|
6929
|
+
inputParameters: [
|
|
6930
|
+
{
|
|
6931
|
+
name: 'previousTitle',
|
|
6932
|
+
description: "Previous title of the conversation",
|
|
6933
|
+
isInput: true,
|
|
6934
|
+
isOutput: false,
|
|
6935
|
+
},
|
|
6936
|
+
{
|
|
6937
|
+
name: 'previousConversationSummary',
|
|
6938
|
+
description: "Previous conversation summary",
|
|
6939
|
+
isInput: true,
|
|
6940
|
+
isOutput: false,
|
|
6941
|
+
},
|
|
6942
|
+
{ name: 'userMessage', description: "User message", isInput: true, isOutput: false },
|
|
6943
|
+
],
|
|
6944
|
+
outputParameters: [
|
|
6945
|
+
{ name: 'title', description: "Title of the conversation", isInput: false, isOutput: true },
|
|
6946
|
+
{ name: 'conversationSummary', description: "Summary of the conversation", isInput: false, isOutput: true },
|
|
6947
|
+
{ name: 'chatbotResponse', description: "Chatbot response", isInput: false, isOutput: true },
|
|
6948
|
+
],
|
|
6949
|
+
},
|
|
6950
|
+
};
|
|
6889
6951
|
|
|
6890
|
-
|
|
6952
|
+
/**
|
|
6953
|
+
* Generator is form of app that @@@
|
|
6954
|
+
*
|
|
6955
|
+
* @public exported from `@promptbook/core`
|
|
6956
|
+
*/
|
|
6957
|
+
var GeneratorFormfactorDefinition = {
|
|
6958
|
+
name: 'GENERATOR',
|
|
6959
|
+
description: "@@@",
|
|
6960
|
+
documentationUrl: "https://github.com/webgptorg/promptbook/discussions/184",
|
|
6961
|
+
pipelineInterface: {
|
|
6962
|
+
inputParameters: [
|
|
6963
|
+
/* @@@ */
|
|
6964
|
+
],
|
|
6965
|
+
outputParameters: [
|
|
6966
|
+
/* @@@ */
|
|
6967
|
+
],
|
|
6891
6968
|
},
|
|
6892
6969
|
};
|
|
6893
6970
|
|
|
@@ -6899,8 +6976,8 @@ var ChatbotFormfactorDefinition = {
|
|
|
6899
6976
|
* @public exported from `@promptbook/core`
|
|
6900
6977
|
*/
|
|
6901
6978
|
var GENERIC_PIPELINE_INTERFACE = {
|
|
6902
|
-
|
|
6903
|
-
|
|
6979
|
+
inputParameters: [],
|
|
6980
|
+
outputParameters: [],
|
|
6904
6981
|
};
|
|
6905
6982
|
/**
|
|
6906
6983
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -6928,10 +7005,10 @@ var MatcherFormfactorDefinition = {
|
|
|
6928
7005
|
description: "@@@",
|
|
6929
7006
|
documentationUrl: "https://github.com/webgptorg/promptbook/discussions/177",
|
|
6930
7007
|
pipelineInterface: {
|
|
6931
|
-
|
|
7008
|
+
inputParameters: [
|
|
6932
7009
|
/* @@@ */
|
|
6933
7010
|
],
|
|
6934
|
-
|
|
7011
|
+
outputParameters: [
|
|
6935
7012
|
/* @@@ */
|
|
6936
7013
|
],
|
|
6937
7014
|
},
|
|
@@ -6947,8 +7024,22 @@ var SheetsFormfactorDefinition = {
|
|
|
6947
7024
|
description: "@@@",
|
|
6948
7025
|
documentationUrl: "https://github.com/webgptorg/promptbook/discussions/176",
|
|
6949
7026
|
pipelineInterface: {
|
|
6950
|
-
|
|
6951
|
-
|
|
7027
|
+
inputParameters: [
|
|
7028
|
+
{
|
|
7029
|
+
name: 'inputSheet',
|
|
7030
|
+
description: "Input sheet to be processed as csv",
|
|
7031
|
+
isInput: true,
|
|
7032
|
+
isOutput: false,
|
|
7033
|
+
},
|
|
7034
|
+
],
|
|
7035
|
+
outputParameters: [
|
|
7036
|
+
{
|
|
7037
|
+
name: 'outputSheet',
|
|
7038
|
+
description: "Output sheet as csv",
|
|
7039
|
+
isInput: false,
|
|
7040
|
+
isOutput: true,
|
|
7041
|
+
},
|
|
7042
|
+
],
|
|
6952
7043
|
},
|
|
6953
7044
|
};
|
|
6954
7045
|
|
|
@@ -6962,9 +7053,23 @@ var TranslatorFormfactorDefinition = {
|
|
|
6962
7053
|
description: "@@@",
|
|
6963
7054
|
documentationUrl: "https://github.com/webgptorg/promptbook/discussions/175",
|
|
6964
7055
|
pipelineInterface: {
|
|
6965
|
-
|
|
6966
|
-
|
|
6967
|
-
|
|
7056
|
+
inputParameters: [
|
|
7057
|
+
{
|
|
7058
|
+
name: 'inputMessage',
|
|
7059
|
+
description: "Input message to be translated",
|
|
7060
|
+
isInput: true,
|
|
7061
|
+
isOutput: false,
|
|
7062
|
+
},
|
|
7063
|
+
],
|
|
7064
|
+
outputParameters: [
|
|
7065
|
+
{
|
|
7066
|
+
name: 'outputMessage',
|
|
7067
|
+
description: "Translated output message",
|
|
7068
|
+
isInput: false,
|
|
7069
|
+
isOutput: true,
|
|
7070
|
+
},
|
|
7071
|
+
],
|
|
7072
|
+
// <- TODO: [🤓] Maybe add {summary}
|
|
6968
7073
|
// <- TODO: [🧠] maybe change to {inputText}, {inputText} / or make system for any name of first input and first outpur parameter
|
|
6969
7074
|
},
|
|
6970
7075
|
};
|
|
@@ -6980,6 +7085,7 @@ var FORMFACTOR_DEFINITIONS = [
|
|
|
6980
7085
|
TranslatorFormfactorDefinition,
|
|
6981
7086
|
SheetsFormfactorDefinition,
|
|
6982
7087
|
MatcherFormfactorDefinition,
|
|
7088
|
+
GeneratorFormfactorDefinition,
|
|
6983
7089
|
];
|
|
6984
7090
|
/**
|
|
6985
7091
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -7092,7 +7198,7 @@ var jokerCommandParser = {
|
|
|
7092
7198
|
/**
|
|
7093
7199
|
* Description of the JOKER command
|
|
7094
7200
|
*/
|
|
7095
|
-
description: "Joker parameter is used instead of executing the
|
|
7201
|
+
description: "Joker parameter is used instead of executing the task result if jokers value meets the expectations requirements",
|
|
7096
7202
|
/**
|
|
7097
7203
|
* Link to documentation
|
|
7098
7204
|
*/
|
|
@@ -7320,7 +7426,7 @@ var parameterCommandParser = {
|
|
|
7320
7426
|
/**
|
|
7321
7427
|
* Description of the PARAMETER command
|
|
7322
7428
|
*/
|
|
7323
|
-
description: "Describes one parameter of the
|
|
7429
|
+
description: "Describes one parameter of the task",
|
|
7324
7430
|
/**
|
|
7325
7431
|
* Link to documentation
|
|
7326
7432
|
*/
|
|
@@ -7676,7 +7782,7 @@ var urlCommandParser = {
|
|
|
7676
7782
|
spaceTrim(
|
|
7677
7783
|
`
|
|
7678
7784
|
URL must not contain hash
|
|
7679
|
-
Hash is used for identification of the
|
|
7785
|
+
Hash is used for identification of the section of the pipeline
|
|
7680
7786
|
`,
|
|
7681
7787
|
),
|
|
7682
7788
|
);
|
|
@@ -7732,7 +7838,7 @@ var actionCommandParser = {
|
|
|
7732
7838
|
/**
|
|
7733
7839
|
* Description of the ACTION command
|
|
7734
7840
|
*/
|
|
7735
|
-
description: "Actions influences from the pipeline or
|
|
7841
|
+
description: "Actions influences from the pipeline or task into external world. Like turning on a light, sending an email, etc.",
|
|
7736
7842
|
/**
|
|
7737
7843
|
* Link to documentation
|
|
7738
7844
|
*/
|
|
@@ -7798,7 +7904,7 @@ var instrumentCommandParser = {
|
|
|
7798
7904
|
/**
|
|
7799
7905
|
* Description of the INSTRUMENT command
|
|
7800
7906
|
*/
|
|
7801
|
-
description: "Instrument command is used to specify the instrument to be used in the pipeline or
|
|
7907
|
+
description: "Instrument command is used to specify the instrument to be used in the pipeline or task like search, calculate, etc.",
|
|
7802
7908
|
/**
|
|
7803
7909
|
* Link to documentation
|
|
7804
7910
|
*/
|
|
@@ -7932,7 +8038,6 @@ function parseCommand(raw, usagePlace) {
|
|
|
7932
8038
|
normalized = normalized.split('(').join('');
|
|
7933
8039
|
normalized = normalized.split(')').join('');
|
|
7934
8040
|
normalized = normalizeTo_SCREAMING_CASE(normalized);
|
|
7935
|
-
normalized = normalized.split('DIALOGUE').join('DIALOG'); // <- TODO: !!!!!! Move to sectionCommandParser
|
|
7936
8041
|
var items = raw
|
|
7937
8042
|
.trim()
|
|
7938
8043
|
// Note: [🐡]
|
|
@@ -8120,7 +8225,7 @@ function extractAllListItemsFromMarkdown(markdown) {
|
|
|
8120
8225
|
function extractOneBlockFromMarkdown(markdown) {
|
|
8121
8226
|
var codeBlocks = extractAllBlocksFromMarkdown(markdown);
|
|
8122
8227
|
if (codeBlocks.length !== 1) {
|
|
8123
|
-
throw new ParseError(spaceTrim(function (block) { return "\n There should be exactly 1 code block in
|
|
8228
|
+
throw new ParseError(spaceTrim(function (block) { return "\n There should be exactly 1 code block in task section, found ".concat(codeBlocks.length, " code blocks\n\n ").concat(block(codeBlocks.map(function (block, i) { return "Block ".concat(i + 1, ":\n").concat(block.content); }).join('\n\n\n')), "\n "); }));
|
|
8124
8229
|
}
|
|
8125
8230
|
return codeBlocks[0];
|
|
8126
8231
|
}
|
|
@@ -8427,7 +8532,7 @@ function pipelineStringToJsonSync(pipelineString) {
|
|
|
8427
8532
|
var command = parseCommand(listItem, 'PIPELINE_HEAD');
|
|
8428
8533
|
var commandParser = getParserForCommand(command);
|
|
8429
8534
|
if (commandParser.isUsedInPipelineHead !== true /* <- Note: [🦦][4] */) {
|
|
8430
|
-
throw new ParseError(spaceTrim$1(function (block) { return "\n Command ".concat(command.type, " is not allowed in the head of the
|
|
8535
|
+
throw new ParseError(spaceTrim$1(function (block) { return "\n Command `".concat(command.type, "` is not allowed in the head of the pipeline ONLY at the pipeline task\n\n ").concat(block(getPipelineIdentification()), "\n "); })); // <- TODO: [🚞]
|
|
8431
8536
|
}
|
|
8432
8537
|
try {
|
|
8433
8538
|
commandParser.$applyToPipelineJson(command, $pipelineJson);
|
|
@@ -8459,7 +8564,7 @@ function pipelineStringToJsonSync(pipelineString) {
|
|
|
8459
8564
|
}
|
|
8460
8565
|
var _loop_2 = function (section) {
|
|
8461
8566
|
var e_5, _l, e_6, _m;
|
|
8462
|
-
// TODO: Parse
|
|
8567
|
+
// TODO: Parse section's description (the content out of the codeblock and lists)
|
|
8463
8568
|
var listItems_2 = extractAllListItemsFromMarkdown(section.content);
|
|
8464
8569
|
var _o = extractOneBlockFromMarkdown(section.content), language = _o.language, content = _o.content;
|
|
8465
8570
|
// TODO: [🎾][1] DRY description
|
|
@@ -8490,7 +8595,7 @@ function pipelineStringToJsonSync(pipelineString) {
|
|
|
8490
8595
|
resultingParameterNameMatch.groups.resultingParamName !== undefined) {
|
|
8491
8596
|
$taskJson.resultingParameterName = resultingParameterNameMatch.groups.resultingParamName;
|
|
8492
8597
|
}
|
|
8493
|
-
// TODO: [🥥] Maybe move this logic to `$
|
|
8598
|
+
// TODO: [🥥] Maybe move this logic to `$parseAndApplyPipelineTaskCommands`
|
|
8494
8599
|
var commands = listItems_2.map(function (listItem) { return ({
|
|
8495
8600
|
listItem: listItem,
|
|
8496
8601
|
command: parseCommand(listItem, 'PIPELINE_TASK'),
|
|
@@ -8505,7 +8610,7 @@ function pipelineStringToJsonSync(pipelineString) {
|
|
|
8505
8610
|
var _loop_4 = function (listItem, command) {
|
|
8506
8611
|
var commandParser = getParserForCommand(command);
|
|
8507
8612
|
if (commandParser.isUsedInPipelineTask !== true /* <- Note: [🦦][4] */) {
|
|
8508
|
-
throw new ParseError(spaceTrim$1(function (block) { return "\n Command ".concat(command.type, " is not allowed in the
|
|
8613
|
+
throw new ParseError(spaceTrim$1(function (block) { return "\n Command `".concat(command.type, "` is not allowed in the task of the promptbook ONLY at the pipeline head\n\n ").concat(block(getPipelineIdentification()), "\n "); })); // <- TODO: [🚞]
|
|
8509
8614
|
}
|
|
8510
8615
|
try {
|
|
8511
8616
|
commandParser.$applyToTaskJson(
|
|
@@ -8516,7 +8621,7 @@ function pipelineStringToJsonSync(pipelineString) {
|
|
|
8516
8621
|
if (!(error instanceof ParseError)) {
|
|
8517
8622
|
throw error;
|
|
8518
8623
|
}
|
|
8519
|
-
throw new ParseError(spaceTrim$1(function (block) { return "\n Command ".concat(command.type, " failed to apply to the
|
|
8624
|
+
throw new ParseError(spaceTrim$1(function (block) { return "\n Command `".concat(command.type, "` failed to apply to the task\n\n The error:\n ").concat(block(error.message), "\n\n Current state of the task:\n ").concat(block(JSON.stringify($taskJson, null, 4)), "\n *<- Maybe wrong order of commands?*\n\n Raw command:\n - ").concat(listItem, "\n\n Usage of ").concat(command.type, ":\n ").concat(block(commandParser.examples.map(function (example) { return "- ".concat(example); }).join('\n')), "\n\n ").concat(block(getPipelineIdentification()), "\n "); })); // <- TODO: [🚞]
|
|
8520
8625
|
}
|
|
8521
8626
|
if (command.type === 'PARAMETER') {
|
|
8522
8627
|
defineParam(command);
|
|
@@ -8537,10 +8642,10 @@ function pipelineStringToJsonSync(pipelineString) {
|
|
|
8537
8642
|
}
|
|
8538
8643
|
finally { if (e_5) throw e_5.error; }
|
|
8539
8644
|
}
|
|
8540
|
-
// TODO: [🍧] Should be done in
|
|
8645
|
+
// TODO: [🍧] Should be done in SECTION command
|
|
8541
8646
|
if ($taskJson.taskType === 'SCRIPT_TASK') {
|
|
8542
8647
|
if (!language) {
|
|
8543
|
-
throw new ParseError(spaceTrim$1(function (block) { return "\n You must specify the language of the script in the SCRIPT
|
|
8648
|
+
throw new ParseError(spaceTrim$1(function (block) { return "\n You must specify the language of the script in the `SCRIPT` task\n\n ".concat(block(getPipelineIdentification()), "\n "); }));
|
|
8544
8649
|
}
|
|
8545
8650
|
if (!SUPPORTED_SCRIPT_LANGUAGES.includes(language)) {
|
|
8546
8651
|
throw new ParseError(spaceTrim$1(function (block) { return "\n Script language ".concat(language, " is not supported.\n\n Supported languages are:\n ").concat(block(SUPPORTED_SCRIPT_LANGUAGES.join(', ')), "\n\n "); }));
|
|
@@ -8551,7 +8656,7 @@ function pipelineStringToJsonSync(pipelineString) {
|
|
|
8551
8656
|
try {
|
|
8552
8657
|
for (var _q = (e_6 = void 0, __values($taskJson.dependentParameterNames)), _r = _q.next(); !_r.done; _r = _q.next()) {
|
|
8553
8658
|
var parameterName = _r.value;
|
|
8554
|
-
// TODO: [🧠] This definition should be made first in the
|
|
8659
|
+
// TODO: [🧠] This definition should be made first in the task
|
|
8555
8660
|
defineParam({
|
|
8556
8661
|
parameterName: parameterName,
|
|
8557
8662
|
parameterDescription: null,
|
|
@@ -8576,7 +8681,7 @@ function pipelineStringToJsonSync(pipelineString) {
|
|
|
8576
8681
|
(block) => `
|
|
8577
8682
|
Model requirements are defined for the block type ${
|
|
8578
8683
|
$taskJson.taskType
|
|
8579
|
-
} which is not a PROMPT
|
|
8684
|
+
} which is not a \`PROMPT\` task
|
|
8580
8685
|
|
|
8581
8686
|
This should be avoided by the \`modelCommandParser\`
|
|
8582
8687
|
|
|
@@ -8595,7 +8700,7 @@ function pipelineStringToJsonSync(pipelineString) {
|
|
|
8595
8700
|
};
|
|
8596
8701
|
try {
|
|
8597
8702
|
// =============================================================
|
|
8598
|
-
// Note: 4️⃣ Process each
|
|
8703
|
+
// Note: 4️⃣ Process each section of the pipeline
|
|
8599
8704
|
for (var pipelineSections_1 = __values(pipelineSections), pipelineSections_1_1 = pipelineSections_1.next(); !pipelineSections_1_1.done; pipelineSections_1_1 = pipelineSections_1.next()) {
|
|
8600
8705
|
var section = pipelineSections_1_1.value;
|
|
8601
8706
|
_loop_2(section);
|
|
@@ -8612,7 +8717,7 @@ function pipelineStringToJsonSync(pipelineString) {
|
|
|
8612
8717
|
// Note: 5️⃣ Mark parameters as INPUT if not explicitly set
|
|
8613
8718
|
if ($pipelineJson.parameters.every(function (parameter) { return !parameter.isInput; })) {
|
|
8614
8719
|
var _loop_3 = function (parameter) {
|
|
8615
|
-
var isThisParameterResulting = $pipelineJson.tasks.some(function (
|
|
8720
|
+
var isThisParameterResulting = $pipelineJson.tasks.some(function (task) { return task.resultingParameterName === parameter.name; });
|
|
8616
8721
|
if (!isThisParameterResulting) {
|
|
8617
8722
|
parameter.isInput = true;
|
|
8618
8723
|
}
|
|
@@ -8783,8 +8888,8 @@ function addAutoGeneratedSection(content, options) {
|
|
|
8783
8888
|
* @public exported from `@promptbook/utils`
|
|
8784
8889
|
*/
|
|
8785
8890
|
function renderPromptbookMermaid(pipelineJson, options) {
|
|
8786
|
-
var _a = (options || {}).
|
|
8787
|
-
var
|
|
8891
|
+
var _a = (options || {}).linkTask, linkTask = _a === void 0 ? function () { return null; } : _a;
|
|
8892
|
+
var parameterNameToTaskName = function (parameterName) {
|
|
8788
8893
|
var parameter = pipelineJson.parameters.find(function (parameter) { return parameter.name === parameterName; });
|
|
8789
8894
|
if (!parameter) {
|
|
8790
8895
|
throw new UnexpectedError("Could not find {".concat(parameterName, "}"));
|
|
@@ -8792,19 +8897,19 @@ function renderPromptbookMermaid(pipelineJson, options) {
|
|
|
8792
8897
|
if (parameter.isInput) {
|
|
8793
8898
|
return 'input';
|
|
8794
8899
|
}
|
|
8795
|
-
var
|
|
8796
|
-
if (!
|
|
8797
|
-
throw new Error("Could not find
|
|
8900
|
+
var task = pipelineJson.tasks.find(function (task) { return task.resultingParameterName === parameterName; });
|
|
8901
|
+
if (!task) {
|
|
8902
|
+
throw new Error("Could not find task for {".concat(parameterName, "}"));
|
|
8798
8903
|
}
|
|
8799
|
-
return normalizeTo_camelCase('
|
|
8904
|
+
return normalizeTo_camelCase('task-' + titleToName(task.title));
|
|
8800
8905
|
};
|
|
8801
8906
|
var promptbookMermaid = spaceTrim$1(function (block) { return "\n\n %% \uD83D\uDD2E Tip: Open this on GitHub or in the VSCode website to see the Mermaid graph visually\n\n flowchart LR\n subgraph \"".concat(pipelineJson.title, "\"\n\n direction TB\n\n input((Input)):::input\n ").concat(block(pipelineJson.tasks
|
|
8802
8907
|
.flatMap(function (_a) {
|
|
8803
8908
|
var title = _a.title, dependentParameterNames = _a.dependentParameterNames, resultingParameterName = _a.resultingParameterName;
|
|
8804
8909
|
return __spreadArray([
|
|
8805
|
-
"".concat(
|
|
8910
|
+
"".concat(parameterNameToTaskName(resultingParameterName), "(\"").concat(title, "\")")
|
|
8806
8911
|
], __read(dependentParameterNames.map(function (dependentParameterName) {
|
|
8807
|
-
return "".concat(
|
|
8912
|
+
return "".concat(parameterNameToTaskName(dependentParameterName), "--\"{").concat(dependentParameterName, "}\"-->").concat(parameterNameToTaskName(resultingParameterName));
|
|
8808
8913
|
})), false);
|
|
8809
8914
|
})
|
|
8810
8915
|
.join('\n')), "\n\n ").concat(block(pipelineJson.parameters
|
|
@@ -8814,17 +8919,17 @@ function renderPromptbookMermaid(pipelineJson, options) {
|
|
|
8814
8919
|
})
|
|
8815
8920
|
.map(function (_a) {
|
|
8816
8921
|
var name = _a.name;
|
|
8817
|
-
return "".concat(
|
|
8922
|
+
return "".concat(parameterNameToTaskName(name), "--\"{").concat(name, "}\"-->output");
|
|
8818
8923
|
})
|
|
8819
8924
|
.join('\n')), "\n output((Output)):::output\n\n ").concat(block(pipelineJson.tasks
|
|
8820
|
-
.map(function (
|
|
8821
|
-
var link =
|
|
8925
|
+
.map(function (task) {
|
|
8926
|
+
var link = linkTask(task);
|
|
8822
8927
|
if (link === null) {
|
|
8823
8928
|
return '';
|
|
8824
8929
|
}
|
|
8825
8930
|
var href = link.href, title = link.title;
|
|
8826
|
-
var
|
|
8827
|
-
return "click ".concat(
|
|
8931
|
+
var taskName = parameterNameToTaskName(task.resultingParameterName);
|
|
8932
|
+
return "click ".concat(taskName, " href \"").concat(href, "\" \"").concat(title, "\";");
|
|
8828
8933
|
})
|
|
8829
8934
|
.filter(function (line) { return line !== ''; })
|
|
8830
8935
|
.join('\n')), "\n\n classDef input color: grey;\n classDef output color: grey;\n\n end;\n\n "); });
|
|
@@ -8855,7 +8960,7 @@ function prettifyPipelineString(pipelineString, options) {
|
|
|
8855
8960
|
case 1:
|
|
8856
8961
|
pipelineJson = _a.sent();
|
|
8857
8962
|
promptbookMermaid_1 = renderPromptbookMermaid(pipelineJson, {
|
|
8858
|
-
|
|
8963
|
+
linkTask: function (task) {
|
|
8859
8964
|
return { href: "#".concat(task.name), title: task.title };
|
|
8860
8965
|
},
|
|
8861
8966
|
});
|
|
@@ -9196,7 +9301,7 @@ function executionReportJsonToString(executionReportJson, options) {
|
|
|
9196
9301
|
if (/^\s*\p{Extended_Pictographic}/u.test(promptExecution.prompt.title)) {
|
|
9197
9302
|
hash = '-' + hash;
|
|
9198
9303
|
}
|
|
9199
|
-
// TODO: Make working hash link for the
|
|
9304
|
+
// TODO: Make working hash link for the task in md + pdf
|
|
9200
9305
|
return "- [".concat(promptExecution.prompt.title, "](#").concat(hash, ")");
|
|
9201
9306
|
})
|
|
9202
9307
|
.join('\n');
|
|
@@ -9205,7 +9310,7 @@ function executionReportJsonToString(executionReportJson, options) {
|
|
|
9205
9310
|
'## ⌚ Time chart' +
|
|
9206
9311
|
'\n\n' +
|
|
9207
9312
|
createMarkdownChart({
|
|
9208
|
-
nameHeader: '
|
|
9313
|
+
nameHeader: 'Task',
|
|
9209
9314
|
valueHeader: 'Timeline',
|
|
9210
9315
|
items: timingItems,
|
|
9211
9316
|
width: chartsWidth,
|
|
@@ -9216,7 +9321,7 @@ function executionReportJsonToString(executionReportJson, options) {
|
|
|
9216
9321
|
'## 💸 Cost chart' +
|
|
9217
9322
|
'\n\n' +
|
|
9218
9323
|
createMarkdownChart({
|
|
9219
|
-
nameHeader: '
|
|
9324
|
+
nameHeader: 'Task',
|
|
9220
9325
|
valueHeader: 'Cost',
|
|
9221
9326
|
items: costItems,
|
|
9222
9327
|
width: chartsWidth,
|
|
@@ -9372,11 +9477,13 @@ var BoilerplateFormfactorDefinition = {
|
|
|
9372
9477
|
name: 'BOILERPLATE',
|
|
9373
9478
|
description: "@@@",
|
|
9374
9479
|
documentationUrl: "https://github.com/webgptorg/promptbook/discussions/@@",
|
|
9480
|
+
// <- TODO: https://github.com/webgptorg/promptbook/discussions/new?category=concepts
|
|
9481
|
+
// "🔠 Boilerplate Formfactor"
|
|
9375
9482
|
pipelineInterface: {
|
|
9376
|
-
|
|
9483
|
+
inputParameters: [
|
|
9377
9484
|
/* @@@ */
|
|
9378
9485
|
],
|
|
9379
|
-
|
|
9486
|
+
outputParameters: [
|
|
9380
9487
|
/* @@@ */
|
|
9381
9488
|
],
|
|
9382
9489
|
},
|
|
@@ -9955,18 +10062,18 @@ var _OpenAiAssistantMetadataRegistration = $llmToolsMetadataRegister.register({
|
|
|
9955
10062
|
function getPipelineInterface(pipeline) {
|
|
9956
10063
|
var e_1, _a, e_2, _b;
|
|
9957
10064
|
var pipelineInterface = {
|
|
9958
|
-
|
|
9959
|
-
|
|
10065
|
+
inputParameters: [],
|
|
10066
|
+
outputParameters: [],
|
|
9960
10067
|
};
|
|
9961
10068
|
try {
|
|
9962
10069
|
for (var _c = __values(pipeline.parameters), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
9963
10070
|
var parameter = _d.value;
|
|
9964
|
-
var
|
|
10071
|
+
var isInput = parameter.isInput, isOutput = parameter.isOutput;
|
|
9965
10072
|
if (isInput) {
|
|
9966
|
-
pipelineInterface.
|
|
10073
|
+
pipelineInterface.inputParameters.push(parameter);
|
|
9967
10074
|
}
|
|
9968
10075
|
if (isOutput) {
|
|
9969
|
-
pipelineInterface.
|
|
10076
|
+
pipelineInterface.outputParameters.push(parameter);
|
|
9970
10077
|
}
|
|
9971
10078
|
}
|
|
9972
10079
|
}
|
|
@@ -9978,9 +10085,15 @@ function getPipelineInterface(pipeline) {
|
|
|
9978
10085
|
finally { if (e_1) throw e_1.error; }
|
|
9979
10086
|
}
|
|
9980
10087
|
try {
|
|
9981
|
-
for (var _e = __values(['
|
|
10088
|
+
for (var _e = __values(['inputParameters', 'outputParameters']), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
9982
10089
|
var key = _f.value;
|
|
9983
|
-
pipelineInterface[key].sort(function (
|
|
10090
|
+
pipelineInterface[key].sort(function (_a, _b) {
|
|
10091
|
+
var name1 = _a.name;
|
|
10092
|
+
var name2 = _b.name;
|
|
10093
|
+
return name1.localeCompare(name2);
|
|
10094
|
+
});
|
|
10095
|
+
// <- TODO: [🧠] Should we compare a descriptions?
|
|
10096
|
+
// <- TODO: [🧠][🛴] Maybe add type + expectations into the intefrace, like "a person name"
|
|
9984
10097
|
}
|
|
9985
10098
|
}
|
|
9986
10099
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
@@ -10248,5 +10361,5 @@ var PrefixStorage = /** @class */ (function () {
|
|
|
10248
10361
|
return PrefixStorage;
|
|
10249
10362
|
}());
|
|
10250
10363
|
|
|
10251
|
-
export { $llmToolsMetadataRegister, $llmToolsRegister, $scrapersMetadataRegister, $scrapersRegister, AbstractFormatError, BOOK_LANGUAGE_VERSION, BlackholeStorage, BoilerplateFormfactorDefinition, CLAIM, CallbackInterfaceTools, ChatbotFormfactorDefinition, CollectionError, CsvFormatDefinition, CsvFormatError, DEFAULT_CSV_SETTINGS, DEFAULT_EXECUTIONS_CACHE_DIRNAME, DEFAULT_INTERMEDIATE_FILES_STRATEGY, DEFAULT_IS_AUTO_INSTALLED, DEFAULT_IS_VERBOSE, DEFAULT_MAX_EXECUTION_ATTEMPTS, DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH, DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL, DEFAULT_MAX_PARALLEL_COUNT, DEFAULT_PIPELINE_COLLECTION_BASE_FILENAME, DEFAULT_REMOTE_URL, DEFAULT_REMOTE_URL_PATH, DEFAULT_SCRAPE_CACHE_DIRNAME, DEFAULT_TITLE, ERRORS, EXPECTATION_UNITS, EnvironmentMismatchError, ExecutionReportStringOptionsDefaults, ExpectError, FORMFACTOR_DEFINITIONS, GENERIC_PIPELINE_INTERFACE, GenericFormfactorDefinition, KnowledgeScrapeError, LimitReachedError, MANDATORY_CSV_SETTINGS, MAX_FILENAME_LENGTH, MODEL_VARIANTS, MatcherFormfactorDefinition, MemoryStorage, MissingToolsError, MultipleLlmExecutionTools, NotFoundError, NotYetImplementedError, PROMPTBOOK_ENGINE_VERSION, ParseError, PipelineExecutionError, PipelineLogicError, PipelineUrlError, PrefixStorage, RESERVED_PARAMETER_NAMES, SectionTypes, SheetsFormfactorDefinition, TextFormatDefinition, TranslatorFormfactorDefinition, UNCERTAIN_USAGE, UnexpectedError, ZERO_USAGE, _AnthropicClaudeMetadataRegistration, _AzureOpenAiMetadataRegistration, _DocumentScraperMetadataRegistration, _LegacyDocumentScraperMetadataRegistration, _MarkdownScraperMetadataRegistration, _OpenAiAssistantMetadataRegistration, _OpenAiMetadataRegistration, _PdfScraperMetadataRegistration, _WebsiteScraperMetadataRegistration, addUsage, assertsExecutionSuccessful, cacheLlmTools, collectionToJson, countTotalUsage, createCollectionFromJson, createCollectionFromPromise, createCollectionFromUrl, createLlmToolsFromConfiguration, createPipelineExecutor, createSubcollection, embeddingVectorToString, executionReportJsonToString, getPipelineInterface, isPassingExpectations, isPipelineImplementingInterface, isPipelineInterfacesEqual, isPipelinePrepared, joinLlmExecutionTools, limitTotalUsage, makeKnowledgeSourceHandler, pipelineJsonToString, pipelineStringToJson, pipelineStringToJsonSync, prepareKnowledgePieces, preparePersona, preparePipeline, prepareTasks, prettifyPipelineString, stringifyPipelineJson, unpreparePipeline, usageToHuman, usageToWorktime, validatePipeline };
|
|
10364
|
+
export { $llmToolsMetadataRegister, $llmToolsRegister, $scrapersMetadataRegister, $scrapersRegister, AbstractFormatError, BOOK_LANGUAGE_VERSION, BlackholeStorage, BoilerplateFormfactorDefinition, CLAIM, CallbackInterfaceTools, ChatbotFormfactorDefinition, CollectionError, CsvFormatDefinition, CsvFormatError, DEFAULT_BOOKS_DIRNAME, DEFAULT_CSV_SETTINGS, DEFAULT_EXECUTIONS_CACHE_DIRNAME, DEFAULT_INTERMEDIATE_FILES_STRATEGY, DEFAULT_IS_AUTO_INSTALLED, DEFAULT_IS_VERBOSE, DEFAULT_MAX_EXECUTION_ATTEMPTS, DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH, DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL, DEFAULT_MAX_PARALLEL_COUNT, DEFAULT_PIPELINE_COLLECTION_BASE_FILENAME, DEFAULT_REMOTE_URL, DEFAULT_REMOTE_URL_PATH, DEFAULT_SCRAPE_CACHE_DIRNAME, DEFAULT_TITLE, ERRORS, EXPECTATION_UNITS, EnvironmentMismatchError, ExecutionReportStringOptionsDefaults, ExpectError, FORMFACTOR_DEFINITIONS, GENERIC_PIPELINE_INTERFACE, GeneratorFormfactorDefinition, GenericFormfactorDefinition, KnowledgeScrapeError, LOGO_DARK_SRC, LOGO_LIGHT_SRC, LimitReachedError, MANDATORY_CSV_SETTINGS, MAX_FILENAME_LENGTH, MODEL_VARIANTS, MatcherFormfactorDefinition, MemoryStorage, MissingToolsError, MultipleLlmExecutionTools, NAME, NonTaskSectionTypes, NotFoundError, NotYetImplementedError, PROMPTBOOK_ENGINE_VERSION, ParseError, PipelineExecutionError, PipelineLogicError, PipelineUrlError, PrefixStorage, RESERVED_PARAMETER_NAMES, SectionTypes, SheetsFormfactorDefinition, TaskTypes, TextFormatDefinition, TranslatorFormfactorDefinition, UNCERTAIN_USAGE, UnexpectedError, ZERO_USAGE, _AnthropicClaudeMetadataRegistration, _AzureOpenAiMetadataRegistration, _DocumentScraperMetadataRegistration, _LegacyDocumentScraperMetadataRegistration, _MarkdownScraperMetadataRegistration, _OpenAiAssistantMetadataRegistration, _OpenAiMetadataRegistration, _PdfScraperMetadataRegistration, _WebsiteScraperMetadataRegistration, addUsage, assertsExecutionSuccessful, cacheLlmTools, collectionToJson, countTotalUsage, createCollectionFromJson, createCollectionFromPromise, createCollectionFromUrl, createLlmToolsFromConfiguration, createPipelineExecutor, createSubcollection, embeddingVectorToString, executionReportJsonToString, getPipelineInterface, isPassingExpectations, isPipelineImplementingInterface, isPipelineInterfacesEqual, isPipelinePrepared, joinLlmExecutionTools, limitTotalUsage, makeKnowledgeSourceHandler, pipelineJsonToString, pipelineStringToJson, pipelineStringToJsonSync, prepareKnowledgePieces, preparePersona, preparePipeline, prepareTasks, prettifyPipelineString, stringifyPipelineJson, unpreparePipeline, usageToHuman, usageToWorktime, validatePipeline };
|
|
10252
10365
|
//# sourceMappingURL=index.es.js.map
|