@promptbook/core 0.71.0-17 → 0.71.0-19
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 +2 -4
- package/esm/index.es.js +86 -91
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/core.index.d.ts +24 -18
- package/esm/typings/src/_packages/node.index.d.ts +2 -0
- package/esm/typings/src/_packages/types.index.d.ts +10 -10
- package/esm/typings/src/_packages/utils.index.d.ts +2 -2
- package/esm/typings/src/collection/PipelineCollection.d.ts +1 -1
- package/esm/typings/src/collection/SimplePipelineCollection.d.ts +2 -2
- package/esm/typings/src/collection/collectionToJson.d.ts +1 -1
- package/esm/typings/src/collection/constructors/createCollectionFromJson.d.ts +1 -1
- package/esm/typings/src/collection/constructors/createCollectionFromPromise.d.ts +1 -1
- package/esm/typings/src/commands/_common/types/CommandParser.d.ts +5 -5
- package/esm/typings/src/config.d.ts +21 -14
- package/esm/typings/src/execution/EmbeddingVector.d.ts +1 -1
- package/esm/typings/src/execution/Executables.d.ts +18 -0
- package/esm/typings/src/execution/ExecutionTools.d.ts +9 -3
- package/esm/typings/src/execution/LlmExecutionTools.d.ts +1 -1
- package/esm/typings/src/execution/PipelineExecutorResult.d.ts +2 -2
- package/esm/typings/src/execution/assertsExecutionSuccessful.d.ts +1 -0
- package/esm/typings/src/execution/createPipelineExecutor/00-CreatePipelineExecutorOptions.d.ts +29 -6
- package/esm/typings/src/execution/createPipelineExecutor/10-executePipeline.d.ts +2 -11
- package/esm/typings/src/execution/createPipelineExecutor/20-executeTemplate.d.ts +4 -13
- package/esm/typings/src/execution/createPipelineExecutor/40-executeAttempts.d.ts +9 -14
- package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/LindatAutomaticTranslator.d.ts +11 -3
- package/esm/typings/src/execution/utils/addUsage.d.ts +1 -1
- package/esm/typings/src/execution/utils/forEachAsync.d.ts +1 -1
- package/esm/typings/src/formats/_common/FormatDefinition.d.ts +2 -2
- package/esm/typings/src/formats/_common/FormatSubvalueDefinition.d.ts +2 -2
- package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsForCli.d.ts +2 -2
- package/esm/typings/src/llm-providers/_common/register/LlmToolsConfiguration.d.ts +1 -1
- package/esm/typings/src/llm-providers/_common/utils/cache/CacheLlmToolsOptions.d.ts +4 -1
- package/esm/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +1 -1
- package/esm/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/mocked/$fakeTextToExpectations.d.ts +1 -1
- package/esm/typings/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/multiple/MultipleLlmExecutionTools.d.ts +4 -5
- package/esm/typings/src/llm-providers/multiple/joinLlmExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/openai/OpenAiExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/openai/openai-models.d.ts +1 -1
- package/esm/typings/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/remote/interfaces/PromptbookServer_ListModels_Response.d.ts +4 -4
- package/esm/typings/src/llm-providers/remote/interfaces/PromptbookServer_Prompt_Response.d.ts +3 -3
- package/esm/typings/src/prepare/PrepareAndScrapeOptions.d.ts +4 -23
- package/esm/typings/src/prepare/prepareTemplates.d.ts +1 -1
- package/esm/typings/src/scrapers/_common/Scraper.d.ts +2 -2
- package/esm/typings/src/scrapers/_common/prepareKnowledgePieces.d.ts +1 -1
- package/esm/typings/src/scrapers/_common/register/$provideExecutablesForNode.d.ts +12 -0
- package/esm/typings/src/scrapers/_common/register/$provideScrapersForBrowser.d.ts +2 -2
- package/esm/typings/src/scrapers/_common/register/$provideScrapersForNode.d.ts +2 -2
- package/esm/typings/src/scrapers/_common/register/ScraperAndConverterMetadata.d.ts +2 -2
- package/esm/typings/src/scrapers/_common/utils/getScraperIntermediateSource.d.ts +2 -2
- package/esm/typings/src/scrapers/_common/utils/makeKnowledgeSourceHandler.d.ts +1 -1
- package/esm/typings/src/scrapers/document/DocumentScraper.d.ts +2 -2
- package/esm/typings/src/scrapers/document/createDocumentScraper.d.ts +1 -1
- package/esm/typings/src/scrapers/document/register-metadata.d.ts +1 -1
- package/esm/typings/src/scrapers/document-legacy/LegacyDocumentScraper.d.ts +3 -3
- package/esm/typings/src/scrapers/document-legacy/createLegacyDocumentScraper.d.ts +1 -1
- package/esm/typings/src/scrapers/document-legacy/register-metadata.d.ts +1 -1
- package/esm/typings/src/scrapers/markdown/MarkdownScraper.d.ts +1 -1
- package/esm/typings/src/scrapers/markdown/createMarkdownScraper.d.ts +1 -1
- package/esm/typings/src/scrapers/markdown/register-metadata.d.ts +1 -1
- package/esm/typings/src/scrapers/pdf/PdfScraper.d.ts +2 -2
- package/esm/typings/src/scrapers/pdf/createPdfScraper.d.ts +1 -1
- package/esm/typings/src/scrapers/pdf/register-metadata.d.ts +1 -1
- package/esm/typings/src/scrapers/website/WebsiteScraper.d.ts +6 -3
- package/esm/typings/src/scrapers/website/createWebsiteScraper.d.ts +1 -1
- package/esm/typings/src/scrapers/website/register-metadata.d.ts +1 -1
- package/esm/typings/src/scrapers/website/utils/createShowdownConverter.d.ts +7 -0
- package/esm/typings/src/scripting/javascript/utils/preserve.d.ts +1 -1
- package/esm/typings/src/storage/file-cache-storage/utils/nameToSubfolderPath.d.ts +1 -1
- package/esm/typings/src/types/Arrayable.d.ts +1 -1
- package/esm/typings/src/types/IntermediateFilesStrategy.d.ts +7 -0
- package/esm/typings/src/types/PipelineJson/KnowledgePieceJson.d.ts +4 -4
- package/esm/typings/src/types/PipelineJson/KnowledgeSourceJson.d.ts +1 -1
- package/esm/typings/src/types/PipelineJson/PersonaJson.d.ts +1 -1
- package/esm/typings/src/types/PipelineJson/TemplateJsonCommon.d.ts +2 -2
- package/esm/typings/src/types/Prompt.d.ts +1 -1
- package/esm/typings/src/types/execution-report/ExecutionReportJson.d.ts +1 -1
- package/esm/typings/src/utils/$Register.d.ts +1 -1
- package/esm/typings/src/utils/FromtoItems.d.ts +1 -1
- package/esm/typings/src/utils/arrayableToArray.d.ts +1 -1
- package/esm/typings/src/utils/emojis.d.ts +1 -1
- package/esm/typings/src/utils/execCommand/$execCommand.d.ts +2 -2
- package/esm/typings/src/utils/execCommand/{IExecCommandOptions.d.ts → ExecCommandOptions.d.ts} +2 -6
- package/esm/typings/src/utils/execCommand/execCommandNormalizeOptions.d.ts +3 -3
- package/esm/typings/src/utils/expectation-counters/countSentences.d.ts +1 -1
- package/esm/typings/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +1 -1
- package/esm/typings/src/utils/markdown/splitMarkdownIntoSections.d.ts +1 -1
- package/esm/typings/src/utils/normalization/IKeywords.d.ts +2 -2
- package/esm/typings/src/utils/normalization/parseKeywords.d.ts +2 -2
- package/esm/typings/src/utils/normalization/parseKeywordsFromString.d.ts +2 -2
- package/esm/typings/src/utils/normalization/searchKeywords.d.ts +2 -2
- package/esm/typings/src/utils/organization/TODO_USE.d.ts +1 -1
- package/esm/typings/src/utils/organization/keepUnused.d.ts +1 -1
- package/esm/typings/src/utils/random/$randomSeed.d.ts +1 -1
- package/esm/typings/src/utils/sets/intersection.d.ts +1 -1
- package/esm/typings/src/utils/sets/union.d.ts +1 -1
- package/esm/typings/src/utils/unwrapResult.d.ts +4 -4
- package/package.json +3 -2
- package/umd/index.umd.js +97 -99
- package/umd/index.umd.js.map +1 -1
- package/esm/typings/src/execution/createPipelineExecutor/00-CreatePipelineExecutorSettings.d.ts +0 -29
- package/esm/typings/src/scrapers/website/utils/markdownConverter.d.ts +0 -12
- /package/esm/typings/src/scrapers/website/utils/{markdownConverter.test.d.ts → createShowdownConverter.test.d.ts} +0 -0
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.71.0-
|
|
19
|
+
var PROMPTBOOK_VERSION = '0.71.0-18';
|
|
20
20
|
// TODO: [main] !!!! List here all the versions and annotate + put into script
|
|
21
21
|
|
|
22
22
|
/*! *****************************************************************************
|
|
@@ -223,7 +223,6 @@
|
|
|
223
223
|
pipelineString += '\n\n';
|
|
224
224
|
pipelineString += description;
|
|
225
225
|
}
|
|
226
|
-
// TODO:> const commands: Array<Command>
|
|
227
226
|
var commands = [];
|
|
228
227
|
if (pipelineUrl) {
|
|
229
228
|
commands.push("PIPELINE URL ".concat(pipelineUrl));
|
|
@@ -279,7 +278,6 @@
|
|
|
279
278
|
pipelineString += '\n\n';
|
|
280
279
|
pipelineString += description_1;
|
|
281
280
|
}
|
|
282
|
-
// TODO:> const commands: Array<Command>
|
|
283
281
|
var commands_1 = [];
|
|
284
282
|
var contentLanguage = 'text';
|
|
285
283
|
if (templateType === 'PROMPT_TEMPLATE') {
|
|
@@ -639,7 +637,7 @@
|
|
|
639
637
|
*
|
|
640
638
|
* @public exported from `@promptbook/core`
|
|
641
639
|
*/
|
|
642
|
-
var CLAIM = "
|
|
640
|
+
var CLAIM = "Build responsible, controlled and transparent applications on top of LLM models!";
|
|
643
641
|
// <- TODO: [🧠] Better system for generator warnings - not always "code" and "by `@promptbook/cli`"
|
|
644
642
|
/**
|
|
645
643
|
* The maximum number of iterations for a loops
|
|
@@ -654,37 +652,44 @@
|
|
|
654
652
|
*/
|
|
655
653
|
var IMMEDIATE_TIME = 10;
|
|
656
654
|
/**
|
|
657
|
-
* The maximum
|
|
655
|
+
* The maximum length of the (generated) filename
|
|
658
656
|
*
|
|
659
657
|
* @public exported from `@promptbook/core`
|
|
660
658
|
*/
|
|
661
|
-
var
|
|
659
|
+
var MAX_FILENAME_LENGTH = 30;
|
|
662
660
|
/**
|
|
663
|
-
*
|
|
661
|
+
* Strategy for caching the intermediate results for knowledge sources
|
|
664
662
|
*
|
|
665
663
|
* @public exported from `@promptbook/core`
|
|
666
664
|
*/
|
|
667
|
-
var
|
|
665
|
+
var DEFAULT_INTERMEDIATE_FILES_STRATEGY = 'HIDE_AND_KEEP';
|
|
666
|
+
// <- TODO: [😡] Change to 'VISIBLE'
|
|
668
667
|
/**
|
|
669
|
-
* The maximum
|
|
668
|
+
* The maximum number of (LLM) tasks running in parallel
|
|
670
669
|
*
|
|
671
670
|
* @public exported from `@promptbook/core`
|
|
672
671
|
*/
|
|
673
|
-
var
|
|
672
|
+
var DEFAULT_MAX_PARALLEL_COUNT = 5; // <- TODO: [🤹♂️]
|
|
673
|
+
/**
|
|
674
|
+
* The maximum number of attempts to execute LLM task before giving up
|
|
675
|
+
*
|
|
676
|
+
* @public exported from `@promptbook/core`
|
|
677
|
+
*/
|
|
678
|
+
var DEFAULT_MAX_EXECUTION_ATTEMPTS = 3; // <- TODO: [🤹♂️]
|
|
674
679
|
/**
|
|
675
680
|
* @@@
|
|
676
681
|
* TODO: [🐝][main] !!! Use
|
|
677
682
|
*
|
|
678
683
|
* @public exported from `@promptbook/core`
|
|
679
684
|
*/
|
|
680
|
-
var
|
|
685
|
+
var DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH = 3;
|
|
681
686
|
/**
|
|
682
687
|
* @@@
|
|
683
688
|
* TODO: [🐝][main] !!! Use
|
|
684
689
|
*
|
|
685
690
|
* @public exported from `@promptbook/core`
|
|
686
691
|
*/
|
|
687
|
-
var
|
|
692
|
+
var DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL = 200;
|
|
688
693
|
/**
|
|
689
694
|
* Where to store the cache of executions for promptbook CLI
|
|
690
695
|
*
|
|
@@ -692,7 +697,7 @@
|
|
|
692
697
|
*
|
|
693
698
|
* @public exported from `@promptbook/core`
|
|
694
699
|
*/
|
|
695
|
-
var
|
|
700
|
+
var DEFAULT_EXECUTIONS_CACHE_DIRNAME = '/.promptbook/executions-cache';
|
|
696
701
|
/**
|
|
697
702
|
* Where to store the scrape cache
|
|
698
703
|
*
|
|
@@ -700,13 +705,13 @@
|
|
|
700
705
|
*
|
|
701
706
|
* @public exported from `@promptbook/core`
|
|
702
707
|
*/
|
|
703
|
-
var
|
|
708
|
+
var DEFAULT_SCRAPE_CACHE_DIRNAME = '/.promptbook/scrape-cache';
|
|
704
709
|
/**
|
|
705
710
|
* The name of the builded pipeline collection made by CLI `ptbk make` and for lookup in `createCollectionFromDirectory`
|
|
706
711
|
*
|
|
707
712
|
* @public exported from `@promptbook/core`
|
|
708
713
|
*/
|
|
709
|
-
var
|
|
714
|
+
var DEFAULT_PIPELINE_COLLECTION_BASE_FILENAME = "index";
|
|
710
715
|
/**
|
|
711
716
|
* Nonce which is used for replacing things in strings
|
|
712
717
|
*
|
|
@@ -779,13 +784,13 @@
|
|
|
779
784
|
*
|
|
780
785
|
* @public exported from `@promptbook/core`
|
|
781
786
|
*/
|
|
782
|
-
var
|
|
787
|
+
var DEFAULT_IS_VERBOSE = false;
|
|
783
788
|
/**
|
|
784
789
|
* @@@
|
|
785
790
|
*
|
|
786
791
|
* @public exported from `@promptbook/core`
|
|
787
792
|
*/
|
|
788
|
-
var
|
|
793
|
+
var DEFAULT_IS_AUTO_INSTALLED = false;
|
|
789
794
|
/**
|
|
790
795
|
* @@@
|
|
791
796
|
*
|
|
@@ -1534,7 +1539,7 @@
|
|
|
1534
1539
|
return __generator(this, function (_d) {
|
|
1535
1540
|
switch (_d.label) {
|
|
1536
1541
|
case 0:
|
|
1537
|
-
_a = options || {}, _b = _a.isVerbose, isVerbose = _b === void 0 ?
|
|
1542
|
+
_a = options || {}, _b = _a.isVerbose, isVerbose = _b === void 0 ? DEFAULT_IS_VERBOSE : _b, _c = _a.isLazyLoaded, isLazyLoaded = _c === void 0 ? false : _c;
|
|
1538
1543
|
collection = createCollectionFromPromise(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
1539
1544
|
return __generator(this, function (_a) {
|
|
1540
1545
|
if (isVerbose) {
|
|
@@ -1975,8 +1980,7 @@
|
|
|
1975
1980
|
* Multiple LLM Execution Tools is a proxy server that uses multiple execution tools internally and exposes the executor interface externally.
|
|
1976
1981
|
*
|
|
1977
1982
|
* Note: Internal utility of `joinLlmExecutionTools` but exposed type
|
|
1978
|
-
* @public exported from `@promptbook/
|
|
1979
|
-
* TODO: !!!!!! Export as runtime class not just type
|
|
1983
|
+
* @public exported from `@promptbook/core`
|
|
1980
1984
|
*/
|
|
1981
1985
|
var MultipleLlmExecutionTools = /** @class */ (function () {
|
|
1982
1986
|
/**
|
|
@@ -2410,6 +2414,7 @@
|
|
|
2410
2414
|
}
|
|
2411
2415
|
}
|
|
2412
2416
|
/**
|
|
2417
|
+
* TODO: [🐚] This function should be removed OR changed OR be completely rewritten
|
|
2413
2418
|
* TODO: [🧠] Can this return type be better typed than void
|
|
2414
2419
|
*/
|
|
2415
2420
|
|
|
@@ -3738,12 +3743,11 @@
|
|
|
3738
3743
|
*/
|
|
3739
3744
|
function executeAttempts(options) {
|
|
3740
3745
|
return __awaiter(this, void 0, void 0, function () {
|
|
3741
|
-
var jokerParameterNames, priority, maxAttempts, preparedContent, parameters, template, preparedPipeline, tools,
|
|
3746
|
+
var jokerParameterNames, priority, maxAttempts, preparedContent, parameters, template, preparedPipeline, tools, $executionReport, pipelineIdentification, maxExecutionAttempts, $ongoingTemplateResult, _llms, llmTools, _loop_1, attempt, state_1;
|
|
3742
3747
|
return __generator(this, function (_a) {
|
|
3743
3748
|
switch (_a.label) {
|
|
3744
3749
|
case 0:
|
|
3745
|
-
jokerParameterNames = options.jokerParameterNames, priority = options.priority, maxAttempts = options.maxAttempts, preparedContent = options.preparedContent, parameters = options.parameters, template = options.template, preparedPipeline = options.preparedPipeline, tools = options.tools,
|
|
3746
|
-
maxExecutionAttempts = settings.maxExecutionAttempts;
|
|
3750
|
+
jokerParameterNames = options.jokerParameterNames, priority = options.priority, maxAttempts = options.maxAttempts, preparedContent = options.preparedContent, parameters = options.parameters, template = options.template, preparedPipeline = options.preparedPipeline, tools = options.tools, $executionReport = options.$executionReport, pipelineIdentification = options.pipelineIdentification, maxExecutionAttempts = options.maxExecutionAttempts;
|
|
3747
3751
|
$ongoingTemplateResult = {
|
|
3748
3752
|
$result: null,
|
|
3749
3753
|
$resultString: null,
|
|
@@ -4109,12 +4113,12 @@
|
|
|
4109
4113
|
*/
|
|
4110
4114
|
function executeFormatSubvalues(options) {
|
|
4111
4115
|
return __awaiter(this, void 0, void 0, function () {
|
|
4112
|
-
var template, jokerParameterNames, parameters, priority,
|
|
4116
|
+
var template, jokerParameterNames, parameters, priority, csvSettings, pipelineIdentification, parameterValue, formatDefinition, subvalueDefinition, formatSettings, resultString;
|
|
4113
4117
|
var _this = this;
|
|
4114
4118
|
return __generator(this, function (_a) {
|
|
4115
4119
|
switch (_a.label) {
|
|
4116
4120
|
case 0:
|
|
4117
|
-
template = options.template, jokerParameterNames = options.jokerParameterNames, parameters = options.parameters, priority = options.priority,
|
|
4121
|
+
template = options.template, jokerParameterNames = options.jokerParameterNames, parameters = options.parameters, priority = options.priority, csvSettings = options.csvSettings, pipelineIdentification = options.pipelineIdentification;
|
|
4118
4122
|
if (template.foreach === undefined) {
|
|
4119
4123
|
return [2 /*return*/, /* not await */ executeAttempts(options)];
|
|
4120
4124
|
}
|
|
@@ -4144,7 +4148,7 @@
|
|
|
4144
4148
|
.join('\n')), "\n\n [\u26F7] This should never happen because subformat name should be validated during parsing\n\n ").concat(block(pipelineIdentification), "\n "); }));
|
|
4145
4149
|
}
|
|
4146
4150
|
if (formatDefinition.formatName === 'CSV') {
|
|
4147
|
-
formatSettings =
|
|
4151
|
+
formatSettings = csvSettings;
|
|
4148
4152
|
// <- TODO: [🤹♂️] More universal, make simmilar pattern for other formats for example \n vs \r\n in text
|
|
4149
4153
|
}
|
|
4150
4154
|
return [4 /*yield*/, subvalueDefinition.mapValues(parameterValue, template.foreach.outputSubparameterName, formatSettings, function (subparameters, index) { return __awaiter(_this, void 0, void 0, function () {
|
|
@@ -4297,13 +4301,12 @@
|
|
|
4297
4301
|
*/
|
|
4298
4302
|
function executeTemplate(options) {
|
|
4299
4303
|
return __awaiter(this, void 0, void 0, function () {
|
|
4300
|
-
var currentTemplate, preparedPipeline, parametersToPass, tools, onProgress,
|
|
4301
|
-
var e_1,
|
|
4302
|
-
return __generator(this, function (
|
|
4303
|
-
switch (
|
|
4304
|
+
var currentTemplate, preparedPipeline, parametersToPass, tools, onProgress, $executionReport, pipelineIdentification, _a, maxExecutionAttempts, name, title, priority, usedParameterNames, dependentParameterNames, definedParameters, _b, _c, _d, definedParameterNames, parameters, _loop_1, _e, _f, parameterName, maxAttempts, jokerParameterNames, preparedContent, resultString;
|
|
4305
|
+
var e_1, _g, _h;
|
|
4306
|
+
return __generator(this, function (_j) {
|
|
4307
|
+
switch (_j.label) {
|
|
4304
4308
|
case 0:
|
|
4305
|
-
currentTemplate = options.currentTemplate, preparedPipeline = options.preparedPipeline, parametersToPass = options.parametersToPass, tools = options.tools, onProgress = options.onProgress,
|
|
4306
|
-
maxExecutionAttempts = settings.maxExecutionAttempts;
|
|
4309
|
+
currentTemplate = options.currentTemplate, preparedPipeline = options.preparedPipeline, parametersToPass = options.parametersToPass, tools = options.tools, onProgress = options.onProgress, $executionReport = options.$executionReport, pipelineIdentification = options.pipelineIdentification, _a = options.maxExecutionAttempts, maxExecutionAttempts = _a === void 0 ? DEFAULT_MAX_EXECUTION_ATTEMPTS : _a;
|
|
4307
4310
|
name = "pipeline-executor-frame-".concat(currentTemplate.name);
|
|
4308
4311
|
title = currentTemplate.title;
|
|
4309
4312
|
priority = preparedPipeline.templates.length - preparedPipeline.templates.indexOf(currentTemplate);
|
|
@@ -4318,7 +4321,7 @@
|
|
|
4318
4321
|
// <- [🍸]
|
|
4319
4322
|
})];
|
|
4320
4323
|
case 1:
|
|
4321
|
-
|
|
4324
|
+
_j.sent();
|
|
4322
4325
|
usedParameterNames = extractParameterNamesFromTemplate(currentTemplate);
|
|
4323
4326
|
dependentParameterNames = new Set(currentTemplate.dependentParameterNames);
|
|
4324
4327
|
// TODO: [👩🏾🤝👩🏻] Use here `mapAvailableToExpectedParameters`
|
|
@@ -4329,15 +4332,15 @@
|
|
|
4329
4332
|
.map(function (name) { return "{".concat(name, "}"); })
|
|
4330
4333
|
.join(', '), "\n\n ").concat(block(pipelineIdentification), "\n\n "); }));
|
|
4331
4334
|
}
|
|
4332
|
-
|
|
4333
|
-
|
|
4335
|
+
_c = (_b = Object).freeze;
|
|
4336
|
+
_d = [{}];
|
|
4334
4337
|
return [4 /*yield*/, getReservedParametersForTemplate({
|
|
4335
4338
|
preparedPipeline: preparedPipeline,
|
|
4336
4339
|
template: currentTemplate,
|
|
4337
4340
|
pipelineIdentification: pipelineIdentification,
|
|
4338
4341
|
})];
|
|
4339
4342
|
case 2:
|
|
4340
|
-
definedParameters =
|
|
4343
|
+
definedParameters = _c.apply(_b, [__assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), parametersToPass])]);
|
|
4341
4344
|
definedParameterNames = new Set(Object.keys(definedParameters));
|
|
4342
4345
|
parameters = {};
|
|
4343
4346
|
_loop_1 = function (parameterName) {
|
|
@@ -4357,15 +4360,15 @@
|
|
|
4357
4360
|
try {
|
|
4358
4361
|
// Note: [2] Check that all used parameters are defined and removing unused parameters for this template
|
|
4359
4362
|
// TODO: [👩🏾🤝👩🏻] Use here `mapAvailableToExpectedParameters`
|
|
4360
|
-
for (
|
|
4361
|
-
parameterName =
|
|
4363
|
+
for (_e = __values(Array.from(union(definedParameterNames, usedParameterNames, dependentParameterNames))), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
4364
|
+
parameterName = _f.value;
|
|
4362
4365
|
_loop_1(parameterName);
|
|
4363
4366
|
}
|
|
4364
4367
|
}
|
|
4365
4368
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
4366
4369
|
finally {
|
|
4367
4370
|
try {
|
|
4368
|
-
if (
|
|
4371
|
+
if (_f && !_f.done && (_g = _e.return)) _g.call(_e);
|
|
4369
4372
|
}
|
|
4370
4373
|
finally { if (e_1) throw e_1.error; }
|
|
4371
4374
|
}
|
|
@@ -4385,12 +4388,11 @@
|
|
|
4385
4388
|
template: currentTemplate,
|
|
4386
4389
|
preparedPipeline: preparedPipeline,
|
|
4387
4390
|
tools: tools,
|
|
4388
|
-
settings: settings,
|
|
4389
4391
|
$executionReport: $executionReport,
|
|
4390
4392
|
pipelineIdentification: pipelineIdentification,
|
|
4391
4393
|
})];
|
|
4392
4394
|
case 3:
|
|
4393
|
-
resultString =
|
|
4395
|
+
resultString = _j.sent();
|
|
4394
4396
|
return [4 /*yield*/, onProgress({
|
|
4395
4397
|
name: name,
|
|
4396
4398
|
title: title,
|
|
@@ -4402,12 +4404,12 @@
|
|
|
4402
4404
|
// <- [🍸]
|
|
4403
4405
|
})];
|
|
4404
4406
|
case 4:
|
|
4405
|
-
|
|
4406
|
-
return [2 /*return*/, Object.freeze((
|
|
4407
|
-
|
|
4407
|
+
_j.sent();
|
|
4408
|
+
return [2 /*return*/, Object.freeze((_h = {},
|
|
4409
|
+
_h[currentTemplate.resultingParameterName] =
|
|
4408
4410
|
// <- Note: [👩👩👧] No need to detect parameter collision here because pipeline checks logic consistency during construction
|
|
4409
4411
|
resultString,
|
|
4410
|
-
|
|
4412
|
+
_h))];
|
|
4411
4413
|
}
|
|
4412
4414
|
});
|
|
4413
4415
|
});
|
|
@@ -4466,13 +4468,12 @@
|
|
|
4466
4468
|
*/
|
|
4467
4469
|
function executePipeline(options) {
|
|
4468
4470
|
return __awaiter(this, void 0, void 0, function () {
|
|
4469
|
-
var inputParameters, tools, onProgress, pipeline, setPreparedPipeline, pipelineIdentification,
|
|
4471
|
+
var inputParameters, tools, onProgress, pipeline, setPreparedPipeline, pipelineIdentification, maxParallelCount, rootDirname, _a, isVerbose, preparedPipeline, errors, warnings, executionReport, isReturned, _b, _c, parameter, e_1_1, _loop_1, _d, _e, parameterName, state_1, e_2_1, parametersToPass, resovedParameterNames_1, unresovedTemplates_1, resolving_1, loopLimit, _loop_2, error_1, usage_1, outputParameters_1, usage, outputParameters;
|
|
4470
4472
|
var e_1, _f, e_2, _g;
|
|
4471
4473
|
return __generator(this, function (_h) {
|
|
4472
4474
|
switch (_h.label) {
|
|
4473
4475
|
case 0:
|
|
4474
|
-
inputParameters = options.inputParameters, tools = options.tools, onProgress = options.onProgress, pipeline = options.pipeline, setPreparedPipeline = options.setPreparedPipeline, pipelineIdentification = options.pipelineIdentification,
|
|
4475
|
-
maxParallelCount = settings.maxParallelCount, rootDirname = settings.rootDirname, _a = settings.isVerbose, isVerbose = _a === void 0 ? IS_VERBOSE : _a;
|
|
4476
|
+
inputParameters = options.inputParameters, tools = options.tools, onProgress = options.onProgress, pipeline = options.pipeline, setPreparedPipeline = options.setPreparedPipeline, pipelineIdentification = options.pipelineIdentification, maxParallelCount = options.maxParallelCount, rootDirname = options.rootDirname, _a = options.isVerbose, isVerbose = _a === void 0 ? DEFAULT_IS_VERBOSE : _a;
|
|
4476
4477
|
preparedPipeline = options.preparedPipeline;
|
|
4477
4478
|
if (!(preparedPipeline === undefined)) return [3 /*break*/, 2];
|
|
4478
4479
|
return [4 /*yield*/, preparePipeline(pipeline, tools, {
|
|
@@ -4657,12 +4658,7 @@
|
|
|
4657
4658
|
return [3 /*break*/, 4];
|
|
4658
4659
|
case 3:
|
|
4659
4660
|
unresovedTemplates_1 = unresovedTemplates_1.filter(function (template) { return template !== currentTemplate; });
|
|
4660
|
-
work_1 = executeTemplate({
|
|
4661
|
-
currentTemplate: currentTemplate,
|
|
4662
|
-
preparedPipeline: preparedPipeline,
|
|
4663
|
-
parametersToPass: parametersToPass,
|
|
4664
|
-
tools: tools,
|
|
4665
|
-
onProgress: function (progress) {
|
|
4661
|
+
work_1 = executeTemplate(__assign(__assign({}, options), { currentTemplate: currentTemplate, preparedPipeline: preparedPipeline, parametersToPass: parametersToPass, tools: tools, onProgress: function (progress) {
|
|
4666
4662
|
if (isReturned) {
|
|
4667
4663
|
throw new UnexpectedError(spaceTrim.spaceTrim(function (block) { return "\n Can not call `onProgress` after pipeline execution is finished\n\n ".concat(block(pipelineIdentification), "\n\n ").concat(block(JSON.stringify(progress, null, 4)
|
|
4668
4664
|
.split('\n')
|
|
@@ -4672,11 +4668,7 @@
|
|
|
4672
4668
|
if (onProgress) {
|
|
4673
4669
|
onProgress(progress);
|
|
4674
4670
|
}
|
|
4675
|
-
},
|
|
4676
|
-
settings: settings,
|
|
4677
|
-
$executionReport: executionReport,
|
|
4678
|
-
pipelineIdentification: spaceTrim.spaceTrim(function (block) { return "\n ".concat(block(pipelineIdentification), "\n Template name: ").concat(currentTemplate.name, "\n Template title: ").concat(currentTemplate.title, "\n "); }),
|
|
4679
|
-
})
|
|
4671
|
+
}, $executionReport: executionReport, pipelineIdentification: spaceTrim.spaceTrim(function (block) { return "\n ".concat(block(pipelineIdentification), "\n Template name: ").concat(currentTemplate.name, "\n Template title: ").concat(currentTemplate.title, "\n "); }) }))
|
|
4680
4672
|
.then(function (newParametersToPass) {
|
|
4681
4673
|
parametersToPass = __assign(__assign({}, newParametersToPass), parametersToPass);
|
|
4682
4674
|
resovedParameterNames_1 = __spreadArray(__spreadArray([], __read(resovedParameterNames_1), false), [currentTemplate.resultingParameterName], false);
|
|
@@ -4780,8 +4772,7 @@
|
|
|
4780
4772
|
*/
|
|
4781
4773
|
function createPipelineExecutor(options) {
|
|
4782
4774
|
var _this = this;
|
|
4783
|
-
var pipeline = options.pipeline, tools = options.tools, _a = options.
|
|
4784
|
-
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, _g = settings.rootDirname, rootDirname = _g === void 0 ? null : _g;
|
|
4775
|
+
var pipeline = options.pipeline, tools = options.tools, _a = options.maxExecutionAttempts, maxExecutionAttempts = _a === void 0 ? DEFAULT_MAX_EXECUTION_ATTEMPTS : _a, _b = options.maxParallelCount, maxParallelCount = _b === void 0 ? DEFAULT_MAX_PARALLEL_COUNT : _b, _c = options.csvSettings, csvSettings = _c === void 0 ? DEFAULT_CSV_SETTINGS : _c, _d = options.isVerbose, isVerbose = _d === void 0 ? DEFAULT_IS_VERBOSE : _d, _e = options.isNotPreparedWarningSupressed, isNotPreparedWarningSupressed = _e === void 0 ? false : _e, _f = options.rootDirname, rootDirname = _f === void 0 ? null : _f;
|
|
4785
4776
|
validatePipeline(pipeline);
|
|
4786
4777
|
var pipelineIdentification = (function () {
|
|
4787
4778
|
// Note: This is a 😐 implementation of [🚞]
|
|
@@ -4815,14 +4806,12 @@
|
|
|
4815
4806
|
tools: tools,
|
|
4816
4807
|
onProgress: onProgress,
|
|
4817
4808
|
pipelineIdentification: spaceTrim.spaceTrim(function (block) { return "\n ".concat(block(pipelineIdentification), "\n ").concat(runCount === 1 ? '' : "Run #".concat(runCount), "\n "); }),
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
rootDirname: rootDirname,
|
|
4825
|
-
},
|
|
4809
|
+
maxExecutionAttempts: maxExecutionAttempts,
|
|
4810
|
+
maxParallelCount: maxParallelCount,
|
|
4811
|
+
csvSettings: csvSettings,
|
|
4812
|
+
isVerbose: isVerbose,
|
|
4813
|
+
isNotPreparedWarningSupressed: isNotPreparedWarningSupressed,
|
|
4814
|
+
rootDirname: rootDirname,
|
|
4826
4815
|
})];
|
|
4827
4816
|
});
|
|
4828
4817
|
}); };
|
|
@@ -4845,7 +4834,7 @@
|
|
|
4845
4834
|
return __generator(this, function (_d) {
|
|
4846
4835
|
switch (_d.label) {
|
|
4847
4836
|
case 0:
|
|
4848
|
-
_a = options.isVerbose, isVerbose = _a === void 0 ?
|
|
4837
|
+
_a = options.isVerbose, isVerbose = _a === void 0 ? DEFAULT_IS_VERBOSE : _a;
|
|
4849
4838
|
if (tools === undefined || tools.llm === undefined) {
|
|
4850
4839
|
throw new MissingToolsError('LLM tools are required for preparing persona');
|
|
4851
4840
|
}
|
|
@@ -5027,7 +5016,7 @@
|
|
|
5027
5016
|
this.storage = globalScope[storageName];
|
|
5028
5017
|
}
|
|
5029
5018
|
$Register.prototype.list = function () {
|
|
5030
|
-
// <- TODO: ReadonlyDeep<
|
|
5019
|
+
// <- TODO: ReadonlyDeep<ReadonlyArray<TRegistered>>
|
|
5031
5020
|
return this.storage;
|
|
5032
5021
|
};
|
|
5033
5022
|
$Register.prototype.register = function (registered) {
|
|
@@ -5079,7 +5068,7 @@
|
|
|
5079
5068
|
* TODO: [®] DRY Register logic
|
|
5080
5069
|
*/
|
|
5081
5070
|
|
|
5082
|
-
// TODO: !!!!!! Maybe delete this function
|
|
5071
|
+
// TODO: !!!!!!last - Maybe delete this function
|
|
5083
5072
|
/**
|
|
5084
5073
|
* Creates a message with all registered scrapers
|
|
5085
5074
|
*
|
|
@@ -5246,7 +5235,6 @@
|
|
|
5246
5235
|
* @private within the repository
|
|
5247
5236
|
*/
|
|
5248
5237
|
function sourceContentToName(sourceContent) {
|
|
5249
|
-
// TODO: !!!!!! Better name for source than gibberish hash
|
|
5250
5238
|
var hash = cryptoJs.SHA256(hexEncoder__default["default"].parse(JSON.stringify(sourceContent)))
|
|
5251
5239
|
// <- TODO: [🥬] Encapsulate sha256 to some private utility function
|
|
5252
5240
|
.toString( /* hex */)
|
|
@@ -5346,7 +5334,7 @@
|
|
|
5346
5334
|
/**
|
|
5347
5335
|
* @@@
|
|
5348
5336
|
*
|
|
5349
|
-
* @
|
|
5337
|
+
* @public exported from `@promptbook/core`
|
|
5350
5338
|
*/
|
|
5351
5339
|
function makeKnowledgeSourceHandler(knowledgeSource, tools, options) {
|
|
5352
5340
|
var _a;
|
|
@@ -5359,7 +5347,7 @@
|
|
|
5359
5347
|
case 0:
|
|
5360
5348
|
sourceContent = knowledgeSource.sourceContent;
|
|
5361
5349
|
name = knowledgeSource.name;
|
|
5362
|
-
_b = options || {}, _c = _b.rootDirname, rootDirname = _c === void 0 ? null : _c, _d = _b.isVerbose, isVerbose = _d === void 0 ?
|
|
5350
|
+
_b = options || {}, _c = _b.rootDirname, rootDirname = _c === void 0 ? null : _c, _d = _b.isVerbose, isVerbose = _d === void 0 ? DEFAULT_IS_VERBOSE : _d;
|
|
5363
5351
|
TODO_USE(isVerbose);
|
|
5364
5352
|
if (!name) {
|
|
5365
5353
|
name = sourceContentToName(sourceContent);
|
|
@@ -5449,7 +5437,7 @@
|
|
|
5449
5437
|
content = _a.sent();
|
|
5450
5438
|
return [2 /*return*/, new Blob([
|
|
5451
5439
|
content,
|
|
5452
|
-
// <- TODO: !!!!!!
|
|
5440
|
+
// <- TODO: !!!!!! Test that this is working
|
|
5453
5441
|
], { type: mimeType_1 })];
|
|
5454
5442
|
}
|
|
5455
5443
|
});
|
|
@@ -5512,7 +5500,7 @@
|
|
|
5512
5500
|
return __generator(this, function (_c) {
|
|
5513
5501
|
switch (_c.label) {
|
|
5514
5502
|
case 0:
|
|
5515
|
-
_a = options.maxParallelCount, maxParallelCount = _a === void 0 ?
|
|
5503
|
+
_a = options.maxParallelCount, maxParallelCount = _a === void 0 ? DEFAULT_MAX_PARALLEL_COUNT : _a, rootDirname = options.rootDirname, _b = options.isVerbose, isVerbose = _b === void 0 ? DEFAULT_IS_VERBOSE : _b;
|
|
5516
5504
|
knowledgePreparedUnflatten = new Array(knowledgeSources.length);
|
|
5517
5505
|
return [4 /*yield*/, forEachAsync(knowledgeSources, { maxParallelCount: maxParallelCount }, function (knowledgeSource, index) { return __awaiter(_this, void 0, void 0, function () {
|
|
5518
5506
|
var partialPieces, sourceHandler, _a, _b, scraper, partialPiecesUnchecked, e_1_1, pieces;
|
|
@@ -5541,7 +5529,8 @@
|
|
|
5541
5529
|
case 4:
|
|
5542
5530
|
partialPiecesUnchecked = _d.sent();
|
|
5543
5531
|
if (partialPiecesUnchecked !== null) {
|
|
5544
|
-
partialPieces = partialPiecesUnchecked;
|
|
5532
|
+
partialPieces = __spreadArray([], __read(partialPiecesUnchecked), false);
|
|
5533
|
+
// <- TODO: [🪓] Here should be no need for spreading new array, just `partialPieces = partialPiecesUnchecked`
|
|
5545
5534
|
return [3 /*break*/, 6];
|
|
5546
5535
|
}
|
|
5547
5536
|
_d.label = 5;
|
|
@@ -5589,7 +5578,7 @@
|
|
|
5589
5578
|
> /**
|
|
5590
5579
|
> * Unprepared knowledge
|
|
5591
5580
|
> * /
|
|
5592
|
-
> readonly knowledgeSources:
|
|
5581
|
+
> readonly knowledgeSources: ReadonlyArray<KnowledgeSourceJson>;
|
|
5593
5582
|
> };
|
|
5594
5583
|
>
|
|
5595
5584
|
> export async function prepareKnowledgePieces(
|
|
@@ -5647,7 +5636,7 @@
|
|
|
5647
5636
|
return __generator(this, function (_b) {
|
|
5648
5637
|
switch (_b.label) {
|
|
5649
5638
|
case 0:
|
|
5650
|
-
_a = options.maxParallelCount, maxParallelCount = _a === void 0 ?
|
|
5639
|
+
_a = options.maxParallelCount, maxParallelCount = _a === void 0 ? DEFAULT_MAX_PARALLEL_COUNT : _a;
|
|
5651
5640
|
templates = pipeline.templates, parameters = pipeline.parameters, knowledgePiecesCount = pipeline.knowledgePiecesCount;
|
|
5652
5641
|
// TODO: [main] !!!!! Apply samples to each template (if missing and is for the template defined)
|
|
5653
5642
|
TODO_USE(parameters);
|
|
@@ -5709,7 +5698,7 @@
|
|
|
5709
5698
|
if (isPipelinePrepared(pipeline)) {
|
|
5710
5699
|
return [2 /*return*/, pipeline];
|
|
5711
5700
|
}
|
|
5712
|
-
rootDirname = options.rootDirname, _a = options.maxParallelCount, maxParallelCount = _a === void 0 ?
|
|
5701
|
+
rootDirname = options.rootDirname, _a = options.maxParallelCount, maxParallelCount = _a === void 0 ? DEFAULT_MAX_PARALLEL_COUNT : _a, _b = options.isVerbose, isVerbose = _b === void 0 ? DEFAULT_IS_VERBOSE : _b;
|
|
5713
5702
|
parameters = pipeline.parameters, templates = pipeline.templates, knowledgeSources = pipeline.knowledgeSources, personas = pipeline.personas;
|
|
5714
5703
|
if (tools === undefined || tools.llm === undefined) {
|
|
5715
5704
|
throw new MissingToolsError('LLM tools are required for preparing the pipeline');
|
|
@@ -5767,7 +5756,9 @@
|
|
|
5767
5756
|
// ----- /Templates preparation -----
|
|
5768
5757
|
// Note: Count total usage
|
|
5769
5758
|
currentPreparation.usage = llmToolsWithUsage.getTotalUsage();
|
|
5770
|
-
return [2 /*return*/, $asDeeplyFrozenSerializableJson('Prepared PipelineJson', __assign(__assign({}, clonePipeline(pipeline)), { templates:
|
|
5759
|
+
return [2 /*return*/, $asDeeplyFrozenSerializableJson('Prepared PipelineJson', __assign(__assign({}, clonePipeline(pipeline)), { templates: __spreadArray([], __read(templatesPrepared), false),
|
|
5760
|
+
// <- TODO: [🪓] Here should be no need for spreading new array, just ` templates: templatesPrepared`
|
|
5761
|
+
knowledgeSources: knowledgeSourcesPrepared, knowledgePieces: knowledgePiecesPrepared, personas: preparedPersonas, preparations: __spreadArray([], __read(preparations), false) }))];
|
|
5771
5762
|
}
|
|
5772
5763
|
});
|
|
5773
5764
|
});
|
|
@@ -8937,7 +8928,7 @@
|
|
|
8937
8928
|
*/
|
|
8938
8929
|
function createLlmToolsFromConfiguration(configuration, options) {
|
|
8939
8930
|
if (options === void 0) { options = {}; }
|
|
8940
|
-
var _a = options.isVerbose, isVerbose = _a === void 0 ?
|
|
8931
|
+
var _a = options.isVerbose, isVerbose = _a === void 0 ? DEFAULT_IS_VERBOSE : _a;
|
|
8941
8932
|
var llmTools = configuration.map(function (llmConfiguration) {
|
|
8942
8933
|
var registeredItem = $llmToolsRegister
|
|
8943
8934
|
.list()
|
|
@@ -9038,7 +9029,7 @@
|
|
|
9038
9029
|
function cacheLlmTools(llmTools, options) {
|
|
9039
9030
|
var _this = this;
|
|
9040
9031
|
if (options === void 0) { options = {}; }
|
|
9041
|
-
var _a = options.storage, storage = _a === void 0 ? new MemoryStorage() : _a, _b = options.
|
|
9032
|
+
var _a = options.storage, storage = _a === void 0 ? new MemoryStorage() : _a, _b = options.isCacheReloaded, isCacheReloaded = _b === void 0 ? false : _b;
|
|
9042
9033
|
var proxyTools = __assign(__assign({}, llmTools), {
|
|
9043
9034
|
// <- Note: [🥫]
|
|
9044
9035
|
get title() {
|
|
@@ -9060,7 +9051,7 @@
|
|
|
9060
9051
|
key = titleToName(prompt.title.substring(0, MAX_FILENAME_LENGTH - 10) +
|
|
9061
9052
|
'-' +
|
|
9062
9053
|
sha256__default["default"](hexEncoder__default["default"].parse(JSON.stringify(prompt.parameters))).toString( /* hex */));
|
|
9063
|
-
if (!!
|
|
9054
|
+
if (!!isCacheReloaded) return [3 /*break*/, 2];
|
|
9064
9055
|
return [4 /*yield*/, storage.getItem(key)];
|
|
9065
9056
|
case 1:
|
|
9066
9057
|
_a = _c.sent();
|
|
@@ -9322,7 +9313,11 @@
|
|
|
9322
9313
|
mimeTypes: ['application/msword', 'text/rtf'],
|
|
9323
9314
|
documentationUrl: 'https://github.com/webgptorg/promptbook/discussions/@@',
|
|
9324
9315
|
isAvilableInBrowser: false,
|
|
9325
|
-
requiredExecutables: [
|
|
9316
|
+
requiredExecutables: [
|
|
9317
|
+
'Pandoc',
|
|
9318
|
+
'LibreOffice',
|
|
9319
|
+
// <- TODO: [🧠] Should be 'LibreOffice' here, its dependency of dependency
|
|
9320
|
+
],
|
|
9326
9321
|
}); /* <- TODO: [🤛] */
|
|
9327
9322
|
/**
|
|
9328
9323
|
* Registration of known scraper metadata
|
|
@@ -9346,7 +9341,7 @@
|
|
|
9346
9341
|
mimeTypes: ['application/vnd.openxmlformats-officedocument.wordprocessingml.document'],
|
|
9347
9342
|
documentationUrl: 'https://github.com/webgptorg/promptbook/discussions/@@',
|
|
9348
9343
|
isAvilableInBrowser: false,
|
|
9349
|
-
requiredExecutables: ['
|
|
9344
|
+
requiredExecutables: ['Pandoc'],
|
|
9350
9345
|
}); /* <- TODO: [🤛] */
|
|
9351
9346
|
/**
|
|
9352
9347
|
* Registration of known scraper metadata
|
|
@@ -9370,7 +9365,7 @@
|
|
|
9370
9365
|
mimeTypes: ['text/markdown', 'text/plain'],
|
|
9371
9366
|
documentationUrl: 'https://github.com/webgptorg/promptbook/discussions/@@',
|
|
9372
9367
|
isAvilableInBrowser: true,
|
|
9373
|
-
requiredExecutables: [
|
|
9368
|
+
requiredExecutables: [],
|
|
9374
9369
|
}); /* <- TODO: [🤛] */
|
|
9375
9370
|
/**
|
|
9376
9371
|
* Registration of known scraper metadata
|
|
@@ -9394,7 +9389,7 @@
|
|
|
9394
9389
|
mimeTypes: ['application/pdf'],
|
|
9395
9390
|
documentationUrl: 'https://github.com/webgptorg/promptbook/discussions/@@',
|
|
9396
9391
|
isAvilableInBrowser: true,
|
|
9397
|
-
requiredExecutables: [
|
|
9392
|
+
requiredExecutables: [],
|
|
9398
9393
|
}); /* <- TODO: [🤛] */
|
|
9399
9394
|
/**
|
|
9400
9395
|
* Registration of known scraper metadata
|
|
@@ -9418,7 +9413,7 @@
|
|
|
9418
9413
|
mimeTypes: ['text/html'],
|
|
9419
9414
|
documentationUrl: 'https://github.com/webgptorg/promptbook/discussions/@@',
|
|
9420
9415
|
isAvilableInBrowser: false,
|
|
9421
|
-
requiredExecutables: [
|
|
9416
|
+
requiredExecutables: [],
|
|
9422
9417
|
}); /* <- TODO: [🤛] */
|
|
9423
9418
|
/**
|
|
9424
9419
|
* Registration of known scraper metadata
|
|
@@ -9791,30 +9786,33 @@
|
|
|
9791
9786
|
exports.CsvFormatDefinition = CsvFormatDefinition;
|
|
9792
9787
|
exports.CsvFormatError = CsvFormatError;
|
|
9793
9788
|
exports.DEFAULT_CSV_SETTINGS = DEFAULT_CSV_SETTINGS;
|
|
9789
|
+
exports.DEFAULT_EXECUTIONS_CACHE_DIRNAME = DEFAULT_EXECUTIONS_CACHE_DIRNAME;
|
|
9790
|
+
exports.DEFAULT_INTERMEDIATE_FILES_STRATEGY = DEFAULT_INTERMEDIATE_FILES_STRATEGY;
|
|
9791
|
+
exports.DEFAULT_IS_AUTO_INSTALLED = DEFAULT_IS_AUTO_INSTALLED;
|
|
9792
|
+
exports.DEFAULT_IS_VERBOSE = DEFAULT_IS_VERBOSE;
|
|
9793
|
+
exports.DEFAULT_MAX_EXECUTION_ATTEMPTS = DEFAULT_MAX_EXECUTION_ATTEMPTS;
|
|
9794
|
+
exports.DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH = DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH;
|
|
9795
|
+
exports.DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL = DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL;
|
|
9796
|
+
exports.DEFAULT_MAX_PARALLEL_COUNT = DEFAULT_MAX_PARALLEL_COUNT;
|
|
9797
|
+
exports.DEFAULT_PIPELINE_COLLECTION_BASE_FILENAME = DEFAULT_PIPELINE_COLLECTION_BASE_FILENAME;
|
|
9794
9798
|
exports.DEFAULT_REMOTE_URL = DEFAULT_REMOTE_URL;
|
|
9795
9799
|
exports.DEFAULT_REMOTE_URL_PATH = DEFAULT_REMOTE_URL_PATH;
|
|
9800
|
+
exports.DEFAULT_SCRAPE_CACHE_DIRNAME = DEFAULT_SCRAPE_CACHE_DIRNAME;
|
|
9796
9801
|
exports.ERRORS = ERRORS;
|
|
9797
|
-
exports.EXECUTIONS_CACHE_DIRNAME = EXECUTIONS_CACHE_DIRNAME;
|
|
9798
9802
|
exports.EXPECTATION_UNITS = EXPECTATION_UNITS;
|
|
9799
9803
|
exports.EnvironmentMismatchError = EnvironmentMismatchError;
|
|
9800
9804
|
exports.ExecutionReportStringOptionsDefaults = ExecutionReportStringOptionsDefaults;
|
|
9801
9805
|
exports.ExpectError = ExpectError;
|
|
9802
|
-
exports.IS_AUTO_INSTALLED = IS_AUTO_INSTALLED;
|
|
9803
|
-
exports.IS_VERBOSE = IS_VERBOSE;
|
|
9804
9806
|
exports.KnowledgeScrapeError = KnowledgeScrapeError;
|
|
9805
9807
|
exports.LimitReachedError = LimitReachedError;
|
|
9806
9808
|
exports.MANDATORY_CSV_SETTINGS = MANDATORY_CSV_SETTINGS;
|
|
9807
|
-
exports.MAX_EXECUTION_ATTEMPTS = MAX_EXECUTION_ATTEMPTS;
|
|
9808
9809
|
exports.MAX_FILENAME_LENGTH = MAX_FILENAME_LENGTH;
|
|
9809
|
-
exports.MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH = MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH;
|
|
9810
|
-
exports.MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL = MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL;
|
|
9811
|
-
exports.MAX_PARALLEL_COUNT = MAX_PARALLEL_COUNT;
|
|
9812
9810
|
exports.MODEL_VARIANTS = MODEL_VARIANTS;
|
|
9813
9811
|
exports.MemoryStorage = MemoryStorage;
|
|
9814
9812
|
exports.MissingToolsError = MissingToolsError;
|
|
9813
|
+
exports.MultipleLlmExecutionTools = MultipleLlmExecutionTools;
|
|
9815
9814
|
exports.NotFoundError = NotFoundError;
|
|
9816
9815
|
exports.NotYetImplementedError = NotYetImplementedError;
|
|
9817
|
-
exports.PIPELINE_COLLECTION_BASE_FILENAME = PIPELINE_COLLECTION_BASE_FILENAME;
|
|
9818
9816
|
exports.PROMPTBOOK_VERSION = PROMPTBOOK_VERSION;
|
|
9819
9817
|
exports.ParseError = ParseError;
|
|
9820
9818
|
exports.PipelineExecutionError = PipelineExecutionError;
|
|
@@ -9822,7 +9820,6 @@
|
|
|
9822
9820
|
exports.PipelineUrlError = PipelineUrlError;
|
|
9823
9821
|
exports.PrefixStorage = PrefixStorage;
|
|
9824
9822
|
exports.RESERVED_PARAMETER_NAMES = RESERVED_PARAMETER_NAMES;
|
|
9825
|
-
exports.SCRAPE_CACHE_DIRNAME = SCRAPE_CACHE_DIRNAME;
|
|
9826
9823
|
exports.TemplateTypes = TemplateTypes;
|
|
9827
9824
|
exports.TextFormatDefinition = TextFormatDefinition;
|
|
9828
9825
|
exports.UnexpectedError = UnexpectedError;
|
|
@@ -9852,6 +9849,7 @@
|
|
|
9852
9849
|
exports.isPipelinePrepared = isPipelinePrepared;
|
|
9853
9850
|
exports.joinLlmExecutionTools = joinLlmExecutionTools;
|
|
9854
9851
|
exports.limitTotalUsage = limitTotalUsage;
|
|
9852
|
+
exports.makeKnowledgeSourceHandler = makeKnowledgeSourceHandler;
|
|
9855
9853
|
exports.pipelineJsonToString = pipelineJsonToString;
|
|
9856
9854
|
exports.pipelineStringToJson = pipelineStringToJson;
|
|
9857
9855
|
exports.pipelineStringToJsonSync = pipelineStringToJsonSync;
|