@promptbook/core 0.72.0-14 → 0.72.0-15
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 +1 -1
- package/esm/index.es.js +85 -90
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/core.index.d.ts +22 -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 +3 -3
- package/esm/typings/src/llm-providers/remote/interfaces/PromptbookServer_Prompt_Response.d.ts +2 -2
- 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 +1 -5
- 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/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 +95 -98
- 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.72.0-
|
|
19
|
+
var PROMPTBOOK_VERSION = '0.72.0-14';
|
|
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) {
|
|
@@ -1820,8 +1825,7 @@
|
|
|
1820
1825
|
* Multiple LLM Execution Tools is a proxy server that uses multiple execution tools internally and exposes the executor interface externally.
|
|
1821
1826
|
*
|
|
1822
1827
|
* Note: Internal utility of `joinLlmExecutionTools` but exposed type
|
|
1823
|
-
* @public exported from `@promptbook/
|
|
1824
|
-
* TODO: !!!!!! Export as runtime class not just type
|
|
1828
|
+
* @public exported from `@promptbook/core`
|
|
1825
1829
|
*/
|
|
1826
1830
|
var MultipleLlmExecutionTools = /** @class */ (function () {
|
|
1827
1831
|
/**
|
|
@@ -2437,6 +2441,7 @@
|
|
|
2437
2441
|
}
|
|
2438
2442
|
}
|
|
2439
2443
|
/**
|
|
2444
|
+
* TODO: [🐚] This function should be removed OR changed OR be completely rewritten
|
|
2440
2445
|
* TODO: [🧠] Can this return type be better typed than void
|
|
2441
2446
|
*/
|
|
2442
2447
|
|
|
@@ -3765,12 +3770,11 @@
|
|
|
3765
3770
|
*/
|
|
3766
3771
|
function executeAttempts(options) {
|
|
3767
3772
|
return __awaiter(this, void 0, void 0, function () {
|
|
3768
|
-
var jokerParameterNames, priority, maxAttempts, preparedContent, parameters, template, preparedPipeline, tools,
|
|
3773
|
+
var jokerParameterNames, priority, maxAttempts, preparedContent, parameters, template, preparedPipeline, tools, $executionReport, pipelineIdentification, maxExecutionAttempts, $ongoingTemplateResult, _llms, llmTools, _loop_1, attempt, state_1;
|
|
3769
3774
|
return __generator(this, function (_a) {
|
|
3770
3775
|
switch (_a.label) {
|
|
3771
3776
|
case 0:
|
|
3772
|
-
jokerParameterNames = options.jokerParameterNames, priority = options.priority, maxAttempts = options.maxAttempts, preparedContent = options.preparedContent, parameters = options.parameters, template = options.template, preparedPipeline = options.preparedPipeline, tools = options.tools,
|
|
3773
|
-
maxExecutionAttempts = settings.maxExecutionAttempts;
|
|
3777
|
+
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;
|
|
3774
3778
|
$ongoingTemplateResult = {
|
|
3775
3779
|
$result: null,
|
|
3776
3780
|
$resultString: null,
|
|
@@ -4136,12 +4140,12 @@
|
|
|
4136
4140
|
*/
|
|
4137
4141
|
function executeFormatSubvalues(options) {
|
|
4138
4142
|
return __awaiter(this, void 0, void 0, function () {
|
|
4139
|
-
var template, jokerParameterNames, parameters, priority,
|
|
4143
|
+
var template, jokerParameterNames, parameters, priority, csvSettings, pipelineIdentification, parameterValue, formatDefinition, subvalueDefinition, formatSettings, resultString;
|
|
4140
4144
|
var _this = this;
|
|
4141
4145
|
return __generator(this, function (_a) {
|
|
4142
4146
|
switch (_a.label) {
|
|
4143
4147
|
case 0:
|
|
4144
|
-
template = options.template, jokerParameterNames = options.jokerParameterNames, parameters = options.parameters, priority = options.priority,
|
|
4148
|
+
template = options.template, jokerParameterNames = options.jokerParameterNames, parameters = options.parameters, priority = options.priority, csvSettings = options.csvSettings, pipelineIdentification = options.pipelineIdentification;
|
|
4145
4149
|
if (template.foreach === undefined) {
|
|
4146
4150
|
return [2 /*return*/, /* not await */ executeAttempts(options)];
|
|
4147
4151
|
}
|
|
@@ -4171,7 +4175,7 @@
|
|
|
4171
4175
|
.join('\n')), "\n\n [\u26F7] This should never happen because subformat name should be validated during parsing\n\n ").concat(block(pipelineIdentification), "\n "); }));
|
|
4172
4176
|
}
|
|
4173
4177
|
if (formatDefinition.formatName === 'CSV') {
|
|
4174
|
-
formatSettings =
|
|
4178
|
+
formatSettings = csvSettings;
|
|
4175
4179
|
// <- TODO: [🤹♂️] More universal, make simmilar pattern for other formats for example \n vs \r\n in text
|
|
4176
4180
|
}
|
|
4177
4181
|
return [4 /*yield*/, subvalueDefinition.mapValues(parameterValue, template.foreach.outputSubparameterName, formatSettings, function (subparameters, index) { return __awaiter(_this, void 0, void 0, function () {
|
|
@@ -4324,13 +4328,12 @@
|
|
|
4324
4328
|
*/
|
|
4325
4329
|
function executeTemplate(options) {
|
|
4326
4330
|
return __awaiter(this, void 0, void 0, function () {
|
|
4327
|
-
var currentTemplate, preparedPipeline, parametersToPass, tools, onProgress,
|
|
4328
|
-
var e_1,
|
|
4329
|
-
return __generator(this, function (
|
|
4330
|
-
switch (
|
|
4331
|
+
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;
|
|
4332
|
+
var e_1, _g, _h;
|
|
4333
|
+
return __generator(this, function (_j) {
|
|
4334
|
+
switch (_j.label) {
|
|
4331
4335
|
case 0:
|
|
4332
|
-
currentTemplate = options.currentTemplate, preparedPipeline = options.preparedPipeline, parametersToPass = options.parametersToPass, tools = options.tools, onProgress = options.onProgress,
|
|
4333
|
-
maxExecutionAttempts = settings.maxExecutionAttempts;
|
|
4336
|
+
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;
|
|
4334
4337
|
name = "pipeline-executor-frame-".concat(currentTemplate.name);
|
|
4335
4338
|
title = currentTemplate.title;
|
|
4336
4339
|
priority = preparedPipeline.templates.length - preparedPipeline.templates.indexOf(currentTemplate);
|
|
@@ -4345,7 +4348,7 @@
|
|
|
4345
4348
|
// <- [🍸]
|
|
4346
4349
|
})];
|
|
4347
4350
|
case 1:
|
|
4348
|
-
|
|
4351
|
+
_j.sent();
|
|
4349
4352
|
usedParameterNames = extractParameterNamesFromTemplate(currentTemplate);
|
|
4350
4353
|
dependentParameterNames = new Set(currentTemplate.dependentParameterNames);
|
|
4351
4354
|
// TODO: [👩🏾🤝👩🏻] Use here `mapAvailableToExpectedParameters`
|
|
@@ -4356,15 +4359,15 @@
|
|
|
4356
4359
|
.map(function (name) { return "{".concat(name, "}"); })
|
|
4357
4360
|
.join(', '), "\n\n ").concat(block(pipelineIdentification), "\n\n "); }));
|
|
4358
4361
|
}
|
|
4359
|
-
|
|
4360
|
-
|
|
4362
|
+
_c = (_b = Object).freeze;
|
|
4363
|
+
_d = [{}];
|
|
4361
4364
|
return [4 /*yield*/, getReservedParametersForTemplate({
|
|
4362
4365
|
preparedPipeline: preparedPipeline,
|
|
4363
4366
|
template: currentTemplate,
|
|
4364
4367
|
pipelineIdentification: pipelineIdentification,
|
|
4365
4368
|
})];
|
|
4366
4369
|
case 2:
|
|
4367
|
-
definedParameters =
|
|
4370
|
+
definedParameters = _c.apply(_b, [__assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), parametersToPass])]);
|
|
4368
4371
|
definedParameterNames = new Set(Object.keys(definedParameters));
|
|
4369
4372
|
parameters = {};
|
|
4370
4373
|
_loop_1 = function (parameterName) {
|
|
@@ -4384,15 +4387,15 @@
|
|
|
4384
4387
|
try {
|
|
4385
4388
|
// Note: [2] Check that all used parameters are defined and removing unused parameters for this template
|
|
4386
4389
|
// TODO: [👩🏾🤝👩🏻] Use here `mapAvailableToExpectedParameters`
|
|
4387
|
-
for (
|
|
4388
|
-
parameterName =
|
|
4390
|
+
for (_e = __values(Array.from(union(definedParameterNames, usedParameterNames, dependentParameterNames))), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
4391
|
+
parameterName = _f.value;
|
|
4389
4392
|
_loop_1(parameterName);
|
|
4390
4393
|
}
|
|
4391
4394
|
}
|
|
4392
4395
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
4393
4396
|
finally {
|
|
4394
4397
|
try {
|
|
4395
|
-
if (
|
|
4398
|
+
if (_f && !_f.done && (_g = _e.return)) _g.call(_e);
|
|
4396
4399
|
}
|
|
4397
4400
|
finally { if (e_1) throw e_1.error; }
|
|
4398
4401
|
}
|
|
@@ -4412,12 +4415,11 @@
|
|
|
4412
4415
|
template: currentTemplate,
|
|
4413
4416
|
preparedPipeline: preparedPipeline,
|
|
4414
4417
|
tools: tools,
|
|
4415
|
-
settings: settings,
|
|
4416
4418
|
$executionReport: $executionReport,
|
|
4417
4419
|
pipelineIdentification: pipelineIdentification,
|
|
4418
4420
|
})];
|
|
4419
4421
|
case 3:
|
|
4420
|
-
resultString =
|
|
4422
|
+
resultString = _j.sent();
|
|
4421
4423
|
return [4 /*yield*/, onProgress({
|
|
4422
4424
|
name: name,
|
|
4423
4425
|
title: title,
|
|
@@ -4429,12 +4431,12 @@
|
|
|
4429
4431
|
// <- [🍸]
|
|
4430
4432
|
})];
|
|
4431
4433
|
case 4:
|
|
4432
|
-
|
|
4433
|
-
return [2 /*return*/, Object.freeze((
|
|
4434
|
-
|
|
4434
|
+
_j.sent();
|
|
4435
|
+
return [2 /*return*/, Object.freeze((_h = {},
|
|
4436
|
+
_h[currentTemplate.resultingParameterName] =
|
|
4435
4437
|
// <- Note: [👩👩👧] No need to detect parameter collision here because pipeline checks logic consistency during construction
|
|
4436
4438
|
resultString,
|
|
4437
|
-
|
|
4439
|
+
_h))];
|
|
4438
4440
|
}
|
|
4439
4441
|
});
|
|
4440
4442
|
});
|
|
@@ -4493,13 +4495,12 @@
|
|
|
4493
4495
|
*/
|
|
4494
4496
|
function executePipeline(options) {
|
|
4495
4497
|
return __awaiter(this, void 0, void 0, function () {
|
|
4496
|
-
var inputParameters, tools, onProgress, pipeline, setPreparedPipeline, pipelineIdentification,
|
|
4498
|
+
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;
|
|
4497
4499
|
var e_1, _f, e_2, _g;
|
|
4498
4500
|
return __generator(this, function (_h) {
|
|
4499
4501
|
switch (_h.label) {
|
|
4500
4502
|
case 0:
|
|
4501
|
-
inputParameters = options.inputParameters, tools = options.tools, onProgress = options.onProgress, pipeline = options.pipeline, setPreparedPipeline = options.setPreparedPipeline, pipelineIdentification = options.pipelineIdentification,
|
|
4502
|
-
maxParallelCount = settings.maxParallelCount, rootDirname = settings.rootDirname, _a = settings.isVerbose, isVerbose = _a === void 0 ? IS_VERBOSE : _a;
|
|
4503
|
+
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;
|
|
4503
4504
|
preparedPipeline = options.preparedPipeline;
|
|
4504
4505
|
if (!(preparedPipeline === undefined)) return [3 /*break*/, 2];
|
|
4505
4506
|
return [4 /*yield*/, preparePipeline(pipeline, tools, {
|
|
@@ -4684,12 +4685,7 @@
|
|
|
4684
4685
|
return [3 /*break*/, 4];
|
|
4685
4686
|
case 3:
|
|
4686
4687
|
unresovedTemplates_1 = unresovedTemplates_1.filter(function (template) { return template !== currentTemplate; });
|
|
4687
|
-
work_1 = executeTemplate({
|
|
4688
|
-
currentTemplate: currentTemplate,
|
|
4689
|
-
preparedPipeline: preparedPipeline,
|
|
4690
|
-
parametersToPass: parametersToPass,
|
|
4691
|
-
tools: tools,
|
|
4692
|
-
onProgress: function (progress) {
|
|
4688
|
+
work_1 = executeTemplate(__assign(__assign({}, options), { currentTemplate: currentTemplate, preparedPipeline: preparedPipeline, parametersToPass: parametersToPass, tools: tools, onProgress: function (progress) {
|
|
4693
4689
|
if (isReturned) {
|
|
4694
4690
|
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)
|
|
4695
4691
|
.split('\n')
|
|
@@ -4699,11 +4695,7 @@
|
|
|
4699
4695
|
if (onProgress) {
|
|
4700
4696
|
onProgress(progress);
|
|
4701
4697
|
}
|
|
4702
|
-
},
|
|
4703
|
-
settings: settings,
|
|
4704
|
-
$executionReport: executionReport,
|
|
4705
|
-
pipelineIdentification: spaceTrim.spaceTrim(function (block) { return "\n ".concat(block(pipelineIdentification), "\n Template name: ").concat(currentTemplate.name, "\n Template title: ").concat(currentTemplate.title, "\n "); }),
|
|
4706
|
-
})
|
|
4698
|
+
}, $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 "); }) }))
|
|
4707
4699
|
.then(function (newParametersToPass) {
|
|
4708
4700
|
parametersToPass = __assign(__assign({}, newParametersToPass), parametersToPass);
|
|
4709
4701
|
resovedParameterNames_1 = __spreadArray(__spreadArray([], __read(resovedParameterNames_1), false), [currentTemplate.resultingParameterName], false);
|
|
@@ -4807,8 +4799,7 @@
|
|
|
4807
4799
|
*/
|
|
4808
4800
|
function createPipelineExecutor(options) {
|
|
4809
4801
|
var _this = this;
|
|
4810
|
-
var pipeline = options.pipeline, tools = options.tools, _a = options.
|
|
4811
|
-
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;
|
|
4802
|
+
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;
|
|
4812
4803
|
validatePipeline(pipeline);
|
|
4813
4804
|
var pipelineIdentification = (function () {
|
|
4814
4805
|
// Note: This is a 😐 implementation of [🚞]
|
|
@@ -4842,14 +4833,12 @@
|
|
|
4842
4833
|
tools: tools,
|
|
4843
4834
|
onProgress: onProgress,
|
|
4844
4835
|
pipelineIdentification: spaceTrim.spaceTrim(function (block) { return "\n ".concat(block(pipelineIdentification), "\n ").concat(runCount === 1 ? '' : "Run #".concat(runCount), "\n "); }),
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
rootDirname: rootDirname,
|
|
4852
|
-
},
|
|
4836
|
+
maxExecutionAttempts: maxExecutionAttempts,
|
|
4837
|
+
maxParallelCount: maxParallelCount,
|
|
4838
|
+
csvSettings: csvSettings,
|
|
4839
|
+
isVerbose: isVerbose,
|
|
4840
|
+
isNotPreparedWarningSupressed: isNotPreparedWarningSupressed,
|
|
4841
|
+
rootDirname: rootDirname,
|
|
4853
4842
|
})];
|
|
4854
4843
|
});
|
|
4855
4844
|
}); };
|
|
@@ -4872,7 +4861,7 @@
|
|
|
4872
4861
|
return __generator(this, function (_d) {
|
|
4873
4862
|
switch (_d.label) {
|
|
4874
4863
|
case 0:
|
|
4875
|
-
_a = options.isVerbose, isVerbose = _a === void 0 ?
|
|
4864
|
+
_a = options.isVerbose, isVerbose = _a === void 0 ? DEFAULT_IS_VERBOSE : _a;
|
|
4876
4865
|
if (tools === undefined || tools.llm === undefined) {
|
|
4877
4866
|
throw new MissingToolsError('LLM tools are required for preparing persona');
|
|
4878
4867
|
}
|
|
@@ -5054,7 +5043,7 @@
|
|
|
5054
5043
|
this.storage = globalScope[storageName];
|
|
5055
5044
|
}
|
|
5056
5045
|
$Register.prototype.list = function () {
|
|
5057
|
-
// <- TODO: ReadonlyDeep<
|
|
5046
|
+
// <- TODO: ReadonlyDeep<ReadonlyArray<TRegistered>>
|
|
5058
5047
|
return this.storage;
|
|
5059
5048
|
};
|
|
5060
5049
|
$Register.prototype.register = function (registered) {
|
|
@@ -5106,7 +5095,7 @@
|
|
|
5106
5095
|
* TODO: [®] DRY Register logic
|
|
5107
5096
|
*/
|
|
5108
5097
|
|
|
5109
|
-
// TODO: !!!!!! Maybe delete this function
|
|
5098
|
+
// TODO: !!!!!!last - Maybe delete this function
|
|
5110
5099
|
/**
|
|
5111
5100
|
* Creates a message with all registered scrapers
|
|
5112
5101
|
*
|
|
@@ -5273,7 +5262,6 @@
|
|
|
5273
5262
|
* @private within the repository
|
|
5274
5263
|
*/
|
|
5275
5264
|
function sourceContentToName(sourceContent) {
|
|
5276
|
-
// TODO: !!!!!! Better name for source than gibberish hash
|
|
5277
5265
|
var hash = cryptoJs.SHA256(hexEncoder__default["default"].parse(JSON.stringify(sourceContent)))
|
|
5278
5266
|
// <- TODO: [🥬] Encapsulate sha256 to some private utility function
|
|
5279
5267
|
.toString( /* hex */)
|
|
@@ -5386,7 +5374,7 @@
|
|
|
5386
5374
|
case 0:
|
|
5387
5375
|
sourceContent = knowledgeSource.sourceContent;
|
|
5388
5376
|
name = knowledgeSource.name;
|
|
5389
|
-
_b = options || {}, _c = _b.rootDirname, rootDirname = _c === void 0 ? null : _c, _d = _b.isVerbose, isVerbose = _d === void 0 ?
|
|
5377
|
+
_b = options || {}, _c = _b.rootDirname, rootDirname = _c === void 0 ? null : _c, _d = _b.isVerbose, isVerbose = _d === void 0 ? DEFAULT_IS_VERBOSE : _d;
|
|
5390
5378
|
TODO_USE(isVerbose);
|
|
5391
5379
|
if (!name) {
|
|
5392
5380
|
name = sourceContentToName(sourceContent);
|
|
@@ -5476,7 +5464,7 @@
|
|
|
5476
5464
|
content = _a.sent();
|
|
5477
5465
|
return [2 /*return*/, new Blob([
|
|
5478
5466
|
content,
|
|
5479
|
-
// <- TODO: !!!!!!
|
|
5467
|
+
// <- TODO: !!!!!! Test that this is working
|
|
5480
5468
|
], { type: mimeType_1 })];
|
|
5481
5469
|
}
|
|
5482
5470
|
});
|
|
@@ -5539,7 +5527,7 @@
|
|
|
5539
5527
|
return __generator(this, function (_c) {
|
|
5540
5528
|
switch (_c.label) {
|
|
5541
5529
|
case 0:
|
|
5542
|
-
_a = options.maxParallelCount, maxParallelCount = _a === void 0 ?
|
|
5530
|
+
_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;
|
|
5543
5531
|
knowledgePreparedUnflatten = new Array(knowledgeSources.length);
|
|
5544
5532
|
return [4 /*yield*/, forEachAsync(knowledgeSources, { maxParallelCount: maxParallelCount }, function (knowledgeSource, index) { return __awaiter(_this, void 0, void 0, function () {
|
|
5545
5533
|
var partialPieces, sourceHandler, _a, _b, scraper, partialPiecesUnchecked, e_1_1, pieces;
|
|
@@ -5568,7 +5556,8 @@
|
|
|
5568
5556
|
case 4:
|
|
5569
5557
|
partialPiecesUnchecked = _d.sent();
|
|
5570
5558
|
if (partialPiecesUnchecked !== null) {
|
|
5571
|
-
partialPieces = partialPiecesUnchecked;
|
|
5559
|
+
partialPieces = __spreadArray([], __read(partialPiecesUnchecked), false);
|
|
5560
|
+
// <- TODO: [🪓] Here should be no need for spreading new array, just `partialPieces = partialPiecesUnchecked`
|
|
5572
5561
|
return [3 /*break*/, 6];
|
|
5573
5562
|
}
|
|
5574
5563
|
_d.label = 5;
|
|
@@ -5616,7 +5605,7 @@
|
|
|
5616
5605
|
> /**
|
|
5617
5606
|
> * Unprepared knowledge
|
|
5618
5607
|
> * /
|
|
5619
|
-
> readonly knowledgeSources:
|
|
5608
|
+
> readonly knowledgeSources: ReadonlyArray<KnowledgeSourceJson>;
|
|
5620
5609
|
> };
|
|
5621
5610
|
>
|
|
5622
5611
|
> export async function prepareKnowledgePieces(
|
|
@@ -5674,7 +5663,7 @@
|
|
|
5674
5663
|
return __generator(this, function (_b) {
|
|
5675
5664
|
switch (_b.label) {
|
|
5676
5665
|
case 0:
|
|
5677
|
-
_a = options.maxParallelCount, maxParallelCount = _a === void 0 ?
|
|
5666
|
+
_a = options.maxParallelCount, maxParallelCount = _a === void 0 ? DEFAULT_MAX_PARALLEL_COUNT : _a;
|
|
5678
5667
|
templates = pipeline.templates, parameters = pipeline.parameters, knowledgePiecesCount = pipeline.knowledgePiecesCount;
|
|
5679
5668
|
// TODO: [main] !!!!! Apply samples to each template (if missing and is for the template defined)
|
|
5680
5669
|
TODO_USE(parameters);
|
|
@@ -5736,7 +5725,7 @@
|
|
|
5736
5725
|
if (isPipelinePrepared(pipeline)) {
|
|
5737
5726
|
return [2 /*return*/, pipeline];
|
|
5738
5727
|
}
|
|
5739
|
-
rootDirname = options.rootDirname, _a = options.maxParallelCount, maxParallelCount = _a === void 0 ?
|
|
5728
|
+
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;
|
|
5740
5729
|
parameters = pipeline.parameters, templates = pipeline.templates, knowledgeSources = pipeline.knowledgeSources, personas = pipeline.personas;
|
|
5741
5730
|
if (tools === undefined || tools.llm === undefined) {
|
|
5742
5731
|
throw new MissingToolsError('LLM tools are required for preparing the pipeline');
|
|
@@ -5794,7 +5783,9 @@
|
|
|
5794
5783
|
// ----- /Templates preparation -----
|
|
5795
5784
|
// Note: Count total usage
|
|
5796
5785
|
currentPreparation.usage = llmToolsWithUsage.getTotalUsage();
|
|
5797
|
-
return [2 /*return*/, $asDeeplyFrozenSerializableJson('Prepared PipelineJson', __assign(__assign({}, clonePipeline(pipeline)), { templates:
|
|
5786
|
+
return [2 /*return*/, $asDeeplyFrozenSerializableJson('Prepared PipelineJson', __assign(__assign({}, clonePipeline(pipeline)), { templates: __spreadArray([], __read(templatesPrepared), false),
|
|
5787
|
+
// <- TODO: [🪓] Here should be no need for spreading new array, just ` templates: templatesPrepared`
|
|
5788
|
+
knowledgeSources: knowledgeSourcesPrepared, knowledgePieces: knowledgePiecesPrepared, personas: preparedPersonas, preparations: __spreadArray([], __read(preparations), false) }))];
|
|
5798
5789
|
}
|
|
5799
5790
|
});
|
|
5800
5791
|
});
|
|
@@ -8964,7 +8955,7 @@
|
|
|
8964
8955
|
*/
|
|
8965
8956
|
function createLlmToolsFromConfiguration(configuration, options) {
|
|
8966
8957
|
if (options === void 0) { options = {}; }
|
|
8967
|
-
var _a = options.isVerbose, isVerbose = _a === void 0 ?
|
|
8958
|
+
var _a = options.isVerbose, isVerbose = _a === void 0 ? DEFAULT_IS_VERBOSE : _a, userId = options.userId;
|
|
8968
8959
|
var llmTools = configuration.map(function (llmConfiguration) {
|
|
8969
8960
|
var registeredItem = $llmToolsRegister
|
|
8970
8961
|
.list()
|
|
@@ -9065,7 +9056,7 @@
|
|
|
9065
9056
|
function cacheLlmTools(llmTools, options) {
|
|
9066
9057
|
var _this = this;
|
|
9067
9058
|
if (options === void 0) { options = {}; }
|
|
9068
|
-
var _a = options.storage, storage = _a === void 0 ? new MemoryStorage() : _a, _b = options.
|
|
9059
|
+
var _a = options.storage, storage = _a === void 0 ? new MemoryStorage() : _a, _b = options.isCacheReloaded, isCacheReloaded = _b === void 0 ? false : _b;
|
|
9069
9060
|
var proxyTools = __assign(__assign({}, llmTools), {
|
|
9070
9061
|
// <- Note: [🥫]
|
|
9071
9062
|
get title() {
|
|
@@ -9087,7 +9078,7 @@
|
|
|
9087
9078
|
key = titleToName(prompt.title.substring(0, MAX_FILENAME_LENGTH - 10) +
|
|
9088
9079
|
'-' +
|
|
9089
9080
|
sha256__default["default"](hexEncoder__default["default"].parse(JSON.stringify(prompt.parameters))).toString( /* hex */));
|
|
9090
|
-
if (!!
|
|
9081
|
+
if (!!isCacheReloaded) return [3 /*break*/, 2];
|
|
9091
9082
|
return [4 /*yield*/, storage.getItem(key)];
|
|
9092
9083
|
case 1:
|
|
9093
9084
|
_a = _c.sent();
|
|
@@ -9396,7 +9387,11 @@
|
|
|
9396
9387
|
mimeTypes: ['application/msword', 'text/rtf'],
|
|
9397
9388
|
documentationUrl: 'https://github.com/webgptorg/promptbook/discussions/@@',
|
|
9398
9389
|
isAvilableInBrowser: false,
|
|
9399
|
-
requiredExecutables: [
|
|
9390
|
+
requiredExecutables: [
|
|
9391
|
+
'Pandoc',
|
|
9392
|
+
'LibreOffice',
|
|
9393
|
+
// <- TODO: [🧠] Should be 'LibreOffice' here, its dependency of dependency
|
|
9394
|
+
],
|
|
9400
9395
|
}); /* <- TODO: [🤛] */
|
|
9401
9396
|
/**
|
|
9402
9397
|
* Registration of known scraper metadata
|
|
@@ -9420,7 +9415,7 @@
|
|
|
9420
9415
|
mimeTypes: ['application/vnd.openxmlformats-officedocument.wordprocessingml.document'],
|
|
9421
9416
|
documentationUrl: 'https://github.com/webgptorg/promptbook/discussions/@@',
|
|
9422
9417
|
isAvilableInBrowser: false,
|
|
9423
|
-
requiredExecutables: ['
|
|
9418
|
+
requiredExecutables: ['Pandoc'],
|
|
9424
9419
|
}); /* <- TODO: [🤛] */
|
|
9425
9420
|
/**
|
|
9426
9421
|
* Registration of known scraper metadata
|
|
@@ -9444,7 +9439,7 @@
|
|
|
9444
9439
|
mimeTypes: ['text/markdown', 'text/plain'],
|
|
9445
9440
|
documentationUrl: 'https://github.com/webgptorg/promptbook/discussions/@@',
|
|
9446
9441
|
isAvilableInBrowser: true,
|
|
9447
|
-
requiredExecutables: [
|
|
9442
|
+
requiredExecutables: [],
|
|
9448
9443
|
}); /* <- TODO: [🤛] */
|
|
9449
9444
|
/**
|
|
9450
9445
|
* Registration of known scraper metadata
|
|
@@ -9468,7 +9463,7 @@
|
|
|
9468
9463
|
mimeTypes: ['application/pdf'],
|
|
9469
9464
|
documentationUrl: 'https://github.com/webgptorg/promptbook/discussions/@@',
|
|
9470
9465
|
isAvilableInBrowser: true,
|
|
9471
|
-
requiredExecutables: [
|
|
9466
|
+
requiredExecutables: [],
|
|
9472
9467
|
}); /* <- TODO: [🤛] */
|
|
9473
9468
|
/**
|
|
9474
9469
|
* Registration of known scraper metadata
|
|
@@ -9492,7 +9487,7 @@
|
|
|
9492
9487
|
mimeTypes: ['text/html'],
|
|
9493
9488
|
documentationUrl: 'https://github.com/webgptorg/promptbook/discussions/@@',
|
|
9494
9489
|
isAvilableInBrowser: false,
|
|
9495
|
-
requiredExecutables: [
|
|
9490
|
+
requiredExecutables: [],
|
|
9496
9491
|
}); /* <- TODO: [🤛] */
|
|
9497
9492
|
/**
|
|
9498
9493
|
* Registration of known scraper metadata
|
|
@@ -9865,30 +9860,33 @@
|
|
|
9865
9860
|
exports.CsvFormatDefinition = CsvFormatDefinition;
|
|
9866
9861
|
exports.CsvFormatError = CsvFormatError;
|
|
9867
9862
|
exports.DEFAULT_CSV_SETTINGS = DEFAULT_CSV_SETTINGS;
|
|
9863
|
+
exports.DEFAULT_EXECUTIONS_CACHE_DIRNAME = DEFAULT_EXECUTIONS_CACHE_DIRNAME;
|
|
9864
|
+
exports.DEFAULT_INTERMEDIATE_FILES_STRATEGY = DEFAULT_INTERMEDIATE_FILES_STRATEGY;
|
|
9865
|
+
exports.DEFAULT_IS_AUTO_INSTALLED = DEFAULT_IS_AUTO_INSTALLED;
|
|
9866
|
+
exports.DEFAULT_IS_VERBOSE = DEFAULT_IS_VERBOSE;
|
|
9867
|
+
exports.DEFAULT_MAX_EXECUTION_ATTEMPTS = DEFAULT_MAX_EXECUTION_ATTEMPTS;
|
|
9868
|
+
exports.DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH = DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH;
|
|
9869
|
+
exports.DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL = DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL;
|
|
9870
|
+
exports.DEFAULT_MAX_PARALLEL_COUNT = DEFAULT_MAX_PARALLEL_COUNT;
|
|
9871
|
+
exports.DEFAULT_PIPELINE_COLLECTION_BASE_FILENAME = DEFAULT_PIPELINE_COLLECTION_BASE_FILENAME;
|
|
9868
9872
|
exports.DEFAULT_REMOTE_URL = DEFAULT_REMOTE_URL;
|
|
9869
9873
|
exports.DEFAULT_REMOTE_URL_PATH = DEFAULT_REMOTE_URL_PATH;
|
|
9874
|
+
exports.DEFAULT_SCRAPE_CACHE_DIRNAME = DEFAULT_SCRAPE_CACHE_DIRNAME;
|
|
9870
9875
|
exports.ERRORS = ERRORS;
|
|
9871
|
-
exports.EXECUTIONS_CACHE_DIRNAME = EXECUTIONS_CACHE_DIRNAME;
|
|
9872
9876
|
exports.EXPECTATION_UNITS = EXPECTATION_UNITS;
|
|
9873
9877
|
exports.EnvironmentMismatchError = EnvironmentMismatchError;
|
|
9874
9878
|
exports.ExecutionReportStringOptionsDefaults = ExecutionReportStringOptionsDefaults;
|
|
9875
9879
|
exports.ExpectError = ExpectError;
|
|
9876
|
-
exports.IS_AUTO_INSTALLED = IS_AUTO_INSTALLED;
|
|
9877
|
-
exports.IS_VERBOSE = IS_VERBOSE;
|
|
9878
9880
|
exports.KnowledgeScrapeError = KnowledgeScrapeError;
|
|
9879
9881
|
exports.LimitReachedError = LimitReachedError;
|
|
9880
9882
|
exports.MANDATORY_CSV_SETTINGS = MANDATORY_CSV_SETTINGS;
|
|
9881
|
-
exports.MAX_EXECUTION_ATTEMPTS = MAX_EXECUTION_ATTEMPTS;
|
|
9882
9883
|
exports.MAX_FILENAME_LENGTH = MAX_FILENAME_LENGTH;
|
|
9883
|
-
exports.MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH = MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH;
|
|
9884
|
-
exports.MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL = MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL;
|
|
9885
|
-
exports.MAX_PARALLEL_COUNT = MAX_PARALLEL_COUNT;
|
|
9886
9884
|
exports.MODEL_VARIANTS = MODEL_VARIANTS;
|
|
9887
9885
|
exports.MemoryStorage = MemoryStorage;
|
|
9888
9886
|
exports.MissingToolsError = MissingToolsError;
|
|
9887
|
+
exports.MultipleLlmExecutionTools = MultipleLlmExecutionTools;
|
|
9889
9888
|
exports.NotFoundError = NotFoundError;
|
|
9890
9889
|
exports.NotYetImplementedError = NotYetImplementedError;
|
|
9891
|
-
exports.PIPELINE_COLLECTION_BASE_FILENAME = PIPELINE_COLLECTION_BASE_FILENAME;
|
|
9892
9890
|
exports.PROMPTBOOK_VERSION = PROMPTBOOK_VERSION;
|
|
9893
9891
|
exports.ParseError = ParseError;
|
|
9894
9892
|
exports.PipelineExecutionError = PipelineExecutionError;
|
|
@@ -9896,7 +9894,6 @@
|
|
|
9896
9894
|
exports.PipelineUrlError = PipelineUrlError;
|
|
9897
9895
|
exports.PrefixStorage = PrefixStorage;
|
|
9898
9896
|
exports.RESERVED_PARAMETER_NAMES = RESERVED_PARAMETER_NAMES;
|
|
9899
|
-
exports.SCRAPE_CACHE_DIRNAME = SCRAPE_CACHE_DIRNAME;
|
|
9900
9897
|
exports.TemplateTypes = TemplateTypes;
|
|
9901
9898
|
exports.TextFormatDefinition = TextFormatDefinition;
|
|
9902
9899
|
exports.UNCERTAIN_USAGE = UNCERTAIN_USAGE;
|