@promptbook/core 0.83.0 → 0.84.0-10
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 +5 -0
- package/esm/index.es.js +176 -41
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/cli.index.d.ts +8 -0
- package/esm/typings/src/_packages/core.index.d.ts +4 -0
- package/esm/typings/src/_packages/editable.index.d.ts +8 -2
- package/esm/typings/src/_packages/markitdown.index.d.ts +8 -0
- package/esm/typings/src/_packages/pdf.index.d.ts +6 -0
- package/esm/typings/src/_packages/utils.index.d.ts +2 -0
- package/esm/typings/src/_packages/wizzard.index.d.ts +8 -0
- package/esm/typings/src/constants.d.ts +1 -1
- package/esm/typings/src/executables/platforms/locateAppOnLinux.d.ts +1 -1
- package/esm/typings/src/executables/platforms/locateAppOnMacOs.d.ts +1 -1
- package/esm/typings/src/pipeline/book-notation.d.ts +4 -0
- package/esm/typings/src/pipeline/prompt-notation.d.ts +18 -0
- package/esm/typings/src/pipeline/prompt-notation.test.d.ts +4 -0
- package/esm/typings/src/scrapers/_boilerplate/BoilerplateScraper.d.ts +43 -0
- package/esm/typings/src/scrapers/_boilerplate/createBoilerplateScraper.d.ts +20 -0
- package/esm/typings/src/scrapers/_boilerplate/playground/boilerplate-scraper-playground.d.ts +5 -0
- package/esm/typings/src/scrapers/_boilerplate/register-constructor.d.ts +15 -0
- package/esm/typings/src/scrapers/_boilerplate/register-metadata.d.ts +28 -0
- package/esm/typings/src/scrapers/markitdown/MarkitdownScraper.d.ts +50 -0
- package/esm/typings/src/scrapers/markitdown/createMarkitdownScraper.d.ts +22 -0
- package/esm/typings/src/scrapers/markitdown/playground/markitdown-scraper-playground.d.ts +5 -0
- package/esm/typings/src/scrapers/markitdown/register-constructor.d.ts +17 -0
- package/esm/typings/src/scrapers/markitdown/register-metadata.d.ts +28 -0
- package/esm/typings/src/types/typeAliases.d.ts +1 -1
- package/esm/typings/src/utils/editable/edit-pipeline-string/addPipelineCommand.d.ts +17 -0
- package/esm/typings/src/utils/editable/edit-pipeline-string/deflatePipeline.d.ts +10 -0
- package/esm/typings/src/utils/editable/{utils → edit-pipeline-string}/removePipelineCommand.d.ts +1 -1
- package/esm/typings/src/utils/editable/edit-pipeline-string/removePipelineCommand.test.d.ts +1 -0
- package/esm/typings/src/utils/editable/utils/isFlatPipeline.d.ts +7 -0
- package/esm/typings/src/utils/editable/utils/renamePipelineParameter.d.ts +3 -0
- package/package.json +2 -2
- package/umd/index.umd.js +177 -40
- package/umd/index.umd.js.map +1 -1
- /package/esm/typings/src/utils/editable/{utils/removePipelineCommand.test.d.ts → edit-pipeline-string/addPipelineCommand.test.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -23,6 +23,10 @@
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
+
<blockquote style="color: #ff8811">
|
|
27
|
+
<b>⚠ Warning:</b> This is a pre-release version of the library. It is not yet ready for production use. Please look at <a href="https://www.npmjs.com/package/@promptbook/core?activeTab=versions">latest stable release</a>.
|
|
28
|
+
</blockquote>
|
|
29
|
+
|
|
26
30
|
## 📦 Package `@promptbook/core`
|
|
27
31
|
|
|
28
32
|
- Promptbooks are [divided into several](#-packages) packages, all are published from [single monorepo](https://github.com/webgptorg/promptbook).
|
|
@@ -269,6 +273,7 @@ Or you can install them separately:
|
|
|
269
273
|
- **[@promptbook/remote-client](https://www.npmjs.com/package/@promptbook/remote-client)** - Remote client for remote execution of promptbooks
|
|
270
274
|
- **[@promptbook/remote-server](https://www.npmjs.com/package/@promptbook/remote-server)** - Remote server for remote execution of promptbooks
|
|
271
275
|
- **[@promptbook/pdf](https://www.npmjs.com/package/@promptbook/pdf)** - Read knowledge from `.pdf` documents
|
|
276
|
+
- **[@promptbook/documents](https://www.npmjs.com/package/@promptbook/markitdown)** - Integration of [Markitdown by Microsoft](https://github.com/microsoft/markitdown)
|
|
272
277
|
- **[@promptbook/documents](https://www.npmjs.com/package/@promptbook/documents)** - Read knowledge from documents like `.docx`, `.odt`,…
|
|
273
278
|
- **[@promptbook/legacy-documents](https://www.npmjs.com/package/@promptbook/legacy-documents)** - Read knowledge from legacy documents like `.doc`, `.rtf`,…
|
|
274
279
|
- **[@promptbook/website-crawler](https://www.npmjs.com/package/@promptbook/website-crawler)** - Crawl knowledge from the web
|
package/esm/index.es.js
CHANGED
|
@@ -25,7 +25,7 @@ var BOOK_LANGUAGE_VERSION = '1.0.0';
|
|
|
25
25
|
* @generated
|
|
26
26
|
* @see https://github.com/webgptorg/promptbook
|
|
27
27
|
*/
|
|
28
|
-
var PROMPTBOOK_ENGINE_VERSION = '0.
|
|
28
|
+
var PROMPTBOOK_ENGINE_VERSION = '0.84.0-9';
|
|
29
29
|
/**
|
|
30
30
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
31
31
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -526,7 +526,7 @@ var NAME = "Promptbook";
|
|
|
526
526
|
*
|
|
527
527
|
* @public exported from `@promptbook/core`
|
|
528
528
|
*/
|
|
529
|
-
var ADMIN_EMAIL = '
|
|
529
|
+
var ADMIN_EMAIL = 'pavol@ptbk.io';
|
|
530
530
|
/**
|
|
531
531
|
* Name of the responsible person for the Promptbook on GitHub
|
|
532
532
|
*
|
|
@@ -1037,7 +1037,7 @@ var ORDER_OF_PIPELINE_JSON = [
|
|
|
1037
1037
|
*
|
|
1038
1038
|
* @private within the repository
|
|
1039
1039
|
*/
|
|
1040
|
-
var REPLACING_NONCE = '
|
|
1040
|
+
var REPLACING_NONCE = 'ptbkauk42kV2dzao34faw7FudQUHYPtW';
|
|
1041
1041
|
/**
|
|
1042
1042
|
* @@@
|
|
1043
1043
|
*
|
|
@@ -2084,7 +2084,7 @@ var LimitReachedError = /** @class */ (function (_super) {
|
|
|
2084
2084
|
var NotYetImplementedError = /** @class */ (function (_super) {
|
|
2085
2085
|
__extends(NotYetImplementedError, _super);
|
|
2086
2086
|
function NotYetImplementedError(message) {
|
|
2087
|
-
var _this = _super.call(this, spaceTrim$1(function (block) { return "\n ".concat(block(message), "\n\n Note: This feature is not implemented yet but it will be soon.\n\n If you want speed up the implementation or just read more, look here:\n https://github.com/webgptorg/promptbook\n\n Or contact us on
|
|
2087
|
+
var _this = _super.call(this, spaceTrim$1(function (block) { return "\n ".concat(block(message), "\n\n Note: This feature is not implemented yet but it will be soon.\n\n If you want speed up the implementation or just read more, look here:\n https://github.com/webgptorg/promptbook\n\n Or contact us on pavol@ptbk.io\n\n "); })) || this;
|
|
2088
2088
|
_this.name = 'NotYetImplementedError';
|
|
2089
2089
|
Object.setPrototypeOf(_this, NotYetImplementedError.prototype);
|
|
2090
2090
|
return _this;
|
|
@@ -8971,6 +8971,55 @@ var HIGH_LEVEL_ABSTRACTIONS = [
|
|
|
8971
8971
|
var SUPPORTED_SCRIPT_LANGUAGES = ['javascript', 'typescript', 'python'];
|
|
8972
8972
|
// <- TODO: [🏥] DRY
|
|
8973
8973
|
|
|
8974
|
+
/**
|
|
8975
|
+
* Removes Markdown (or HTML) comments
|
|
8976
|
+
*
|
|
8977
|
+
* @param {string} content - The string to remove comments from.
|
|
8978
|
+
* @returns {string} The input string with all comments removed.
|
|
8979
|
+
* @public exported from `@promptbook/markdown-utils`
|
|
8980
|
+
*/
|
|
8981
|
+
function removeMarkdownComments(content) {
|
|
8982
|
+
return spaceTrim$1(content.replace(/<!--(.*?)-->/gs, ''));
|
|
8983
|
+
}
|
|
8984
|
+
|
|
8985
|
+
/**
|
|
8986
|
+
* @@@
|
|
8987
|
+
*
|
|
8988
|
+
* @public exported from `@promptbook/editable`
|
|
8989
|
+
*/
|
|
8990
|
+
function isFlatPipeline(pipelineString) {
|
|
8991
|
+
pipelineString = removeMarkdownComments(pipelineString);
|
|
8992
|
+
pipelineString = spaceTrim(pipelineString);
|
|
8993
|
+
var isMarkdownBeginningWithHeadline = pipelineString.startsWith('# ');
|
|
8994
|
+
var isLastLineReturnStatement = pipelineString.split('\n').pop().split('`').join('').startsWith('->');
|
|
8995
|
+
// TODO: Also (double)check
|
|
8996
|
+
// > const usedCommands
|
|
8997
|
+
// > const isBlocksUsed
|
|
8998
|
+
// > const returnStatementCount
|
|
8999
|
+
var isFlat = !isMarkdownBeginningWithHeadline && isLastLineReturnStatement;
|
|
9000
|
+
return isFlat;
|
|
9001
|
+
}
|
|
9002
|
+
|
|
9003
|
+
/**
|
|
9004
|
+
* @@@
|
|
9005
|
+
*
|
|
9006
|
+
* @public exported from `@promptbook/editable`
|
|
9007
|
+
*/
|
|
9008
|
+
function deflatePipeline(pipelineString) {
|
|
9009
|
+
if (!isFlatPipeline(pipelineString)) {
|
|
9010
|
+
return pipelineString;
|
|
9011
|
+
}
|
|
9012
|
+
var pipelineStringLines = pipelineString.split('\n');
|
|
9013
|
+
var returnStatement = pipelineStringLines.pop();
|
|
9014
|
+
var prompt = spaceTrim(pipelineStringLines.join('\n'));
|
|
9015
|
+
pipelineString = validatePipelineString(spaceTrim(function (block) { return "\n # ".concat(DEFAULT_BOOK_TITLE, "\n\n ## Prompt\n\n ```\n ").concat(block(prompt), "\n ```\n\n ").concat(returnStatement, "\n "); }));
|
|
9016
|
+
// <- TODO: Maybe use book` notation
|
|
9017
|
+
return pipelineString;
|
|
9018
|
+
}
|
|
9019
|
+
/**
|
|
9020
|
+
* TODO: Unit test
|
|
9021
|
+
*/
|
|
9022
|
+
|
|
8974
9023
|
/**
|
|
8975
9024
|
* Utility function to extract all list items from markdown
|
|
8976
9025
|
*
|
|
@@ -9186,17 +9235,6 @@ function flattenMarkdown(markdown) {
|
|
|
9186
9235
|
* NOW we are working just with markdown string and its good enough
|
|
9187
9236
|
*/
|
|
9188
9237
|
|
|
9189
|
-
/**
|
|
9190
|
-
* Removes Markdown (or HTML) comments
|
|
9191
|
-
*
|
|
9192
|
-
* @param {string} content - The string to remove comments from.
|
|
9193
|
-
* @returns {string} The input string with all comments removed.
|
|
9194
|
-
* @public exported from `@promptbook/markdown-utils`
|
|
9195
|
-
*/
|
|
9196
|
-
function removeMarkdownComments(content) {
|
|
9197
|
-
return spaceTrim$1(content.replace(/<!--(.*?)-->/gs, ''));
|
|
9198
|
-
}
|
|
9199
|
-
|
|
9200
9238
|
/**
|
|
9201
9239
|
* @@@
|
|
9202
9240
|
*
|
|
@@ -9281,26 +9319,9 @@ function parsePipeline(pipelineString) {
|
|
|
9281
9319
|
pipelineString = removeMarkdownComments(pipelineString);
|
|
9282
9320
|
pipelineString = spaceTrim$1(pipelineString);
|
|
9283
9321
|
// <- TODO: [😧] `spaceTrim` should preserve discriminated type *(or at lease `PipelineString`)*
|
|
9322
|
+
pipelineString = deflatePipeline(pipelineString);
|
|
9284
9323
|
// ==============
|
|
9285
|
-
// Note: 1️⃣◽2️⃣
|
|
9286
|
-
var isMarkdownBeginningWithHeadline = pipelineString.startsWith('# ');
|
|
9287
|
-
var isLastLineReturnStatement = pipelineString.split('\n').pop().split('`').join('').startsWith('->');
|
|
9288
|
-
// TODO: Also (double)check
|
|
9289
|
-
// > const usedCommands
|
|
9290
|
-
// > const isBlocksUsed
|
|
9291
|
-
// > const returnStatementCount
|
|
9292
|
-
var isFlatPipeline = !isMarkdownBeginningWithHeadline && isLastLineReturnStatement;
|
|
9293
|
-
// console.log({ isMarkdownBeginningWithHeadline, isLastLineReturnStatement, isFlatPipeline });
|
|
9294
|
-
if (isFlatPipeline) {
|
|
9295
|
-
var pipelineStringLines = pipelineString.split('\n');
|
|
9296
|
-
var returnStatement_1 = pipelineStringLines.pop();
|
|
9297
|
-
var prompt_1 = spaceTrim$1(pipelineStringLines.join('\n'));
|
|
9298
|
-
pipelineString = validatePipelineString(spaceTrim$1(function (block) { return "\n # ".concat(DEFAULT_BOOK_TITLE, "\n\n ## Prompt\n\n ```\n ").concat(block(prompt_1), "\n ```\n\n ").concat(returnStatement_1, "\n "); }));
|
|
9299
|
-
// <- TODO: Maybe use book` notation
|
|
9300
|
-
// console.log(pipelineString);
|
|
9301
|
-
}
|
|
9302
|
-
// ==============
|
|
9303
|
-
// Note: 1️⃣◽3️⃣ Parse the markdown
|
|
9324
|
+
// Note: 1️⃣◽2️⃣ Parse the markdown
|
|
9304
9325
|
pipelineString = flattenMarkdown(pipelineString) /* <- Note: [🥞] */;
|
|
9305
9326
|
pipelineString = pipelineString.replaceAll(/`\{(?<parameterName>[a-z0-9_]+)\}`/gi, '{$<parameterName>}');
|
|
9306
9327
|
pipelineString = pipelineString.replaceAll(/`->\s+\{(?<parameterName>[a-z0-9_]+)\}`/gi, '-> {$<parameterName>}');
|
|
@@ -11051,9 +11072,59 @@ function isValidPipelineString(pipelineString) {
|
|
|
11051
11072
|
* TODO: [🧠][🈴] Where is the best location for this file
|
|
11052
11073
|
*/
|
|
11053
11074
|
|
|
11075
|
+
/**
|
|
11076
|
+
* Tag function for notating a prompt as template literal
|
|
11077
|
+
*
|
|
11078
|
+
* Note: There are 2 similar functions:
|
|
11079
|
+
* 1) `prompt` for notating single prompt exported from `@promptbook/utils`
|
|
11080
|
+
* 1) `book` for notating and validating entire books exported from `@promptbook/utils`
|
|
11081
|
+
*
|
|
11082
|
+
* @param strings @@@
|
|
11083
|
+
* @param values @@@
|
|
11084
|
+
* @returns the pipeline string
|
|
11085
|
+
* @public exported from `@promptbook/utils`
|
|
11086
|
+
*/
|
|
11087
|
+
function prompt(strings) {
|
|
11088
|
+
var values = [];
|
|
11089
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
11090
|
+
values[_i - 1] = arguments[_i];
|
|
11091
|
+
}
|
|
11092
|
+
if (values.length === 0) {
|
|
11093
|
+
return spaceTrim(strings.join(''));
|
|
11094
|
+
}
|
|
11095
|
+
var placeholderParameterNames = values.map(function (value, i) { return "".concat(REPLACING_NONCE).concat(i); });
|
|
11096
|
+
var parameters = Object.fromEntries(values.map(function (value, i) { return [placeholderParameterNames[i], value]; }));
|
|
11097
|
+
// Combine strings and values
|
|
11098
|
+
var pipelineString = strings.reduce(function (result, stringsItem, i) {
|
|
11099
|
+
return placeholderParameterNames[i] === undefined
|
|
11100
|
+
? "".concat(result).concat(stringsItem)
|
|
11101
|
+
: "".concat(result).concat(stringsItem, "{").concat(placeholderParameterNames[i], "}");
|
|
11102
|
+
}, '');
|
|
11103
|
+
pipelineString = spaceTrim(pipelineString);
|
|
11104
|
+
try {
|
|
11105
|
+
pipelineString = templateParameters(pipelineString, parameters);
|
|
11106
|
+
}
|
|
11107
|
+
catch (error) {
|
|
11108
|
+
if (!(error instanceof PipelineExecutionError)) {
|
|
11109
|
+
throw error;
|
|
11110
|
+
}
|
|
11111
|
+
console.error({ pipelineString: pipelineString, parameters: parameters, placeholderParameterNames: placeholderParameterNames, error: error });
|
|
11112
|
+
throw new UnexpectedError(spaceTrim(function (block) { return "\n Internal error in prompt template literal\n \n ".concat(block(JSON.stringify({ strings: strings, values: values }, null, 4)), "}\n \n "); }));
|
|
11113
|
+
}
|
|
11114
|
+
return pipelineString;
|
|
11115
|
+
}
|
|
11116
|
+
/**
|
|
11117
|
+
* TODO: [🧠][🈴] Where is the best location for this file
|
|
11118
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
11119
|
+
*/
|
|
11120
|
+
|
|
11054
11121
|
/**
|
|
11055
11122
|
* Tag function for notating a pipeline with a book\`...\ notation as template literal
|
|
11056
11123
|
*
|
|
11124
|
+
* Note: There are 2 similar functions:
|
|
11125
|
+
* 1) `prompt` for notating single prompt exported from `@promptbook/utils`
|
|
11126
|
+
* 1) `book` for notating and validating entire books exported from `@promptbook/utils`
|
|
11127
|
+
*
|
|
11057
11128
|
* @param strings @@@
|
|
11058
11129
|
* @param values @@@
|
|
11059
11130
|
* @returns the pipeline string
|
|
@@ -11064,11 +11135,7 @@ function book(strings) {
|
|
|
11064
11135
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
11065
11136
|
values[_i - 1] = arguments[_i];
|
|
11066
11137
|
}
|
|
11067
|
-
|
|
11068
|
-
throw new NotYetImplementedError("Only one string without interpolated value is supported for now in book`...` notation");
|
|
11069
|
-
}
|
|
11070
|
-
var pipelineString = strings[0];
|
|
11071
|
-
pipelineString = spaceTrim(pipelineString);
|
|
11138
|
+
var pipelineString = prompt.apply(void 0, __spreadArray([strings], __read(values), false));
|
|
11072
11139
|
if (!isValidPipelineString(pipelineString)) {
|
|
11073
11140
|
// TODO: Make the CustomError for this
|
|
11074
11141
|
throw new Error(spaceTrim("\n The string is not a valid pipeline string\n\n book`\n ".concat(pipelineString, "\n `\n ")));
|
|
@@ -11080,6 +11147,40 @@ function book(strings) {
|
|
|
11080
11147
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
11081
11148
|
*/
|
|
11082
11149
|
|
|
11150
|
+
/**
|
|
11151
|
+
* Metadata of the scraper
|
|
11152
|
+
*
|
|
11153
|
+
* @private within the scraper directory
|
|
11154
|
+
*/
|
|
11155
|
+
var boilerplateScraperMetadata = $deepFreeze({
|
|
11156
|
+
title: 'Boilerplate scraper',
|
|
11157
|
+
packageName: '@promptbook/boilerplate',
|
|
11158
|
+
className: 'BoilerplateScraper',
|
|
11159
|
+
mimeTypes: [
|
|
11160
|
+
'@@@/@@@',
|
|
11161
|
+
// <- TODO: @@@ Add compatible mime types with Boilerplate scraper
|
|
11162
|
+
],
|
|
11163
|
+
documentationUrl: 'https://github.com/webgptorg/promptbook/discussions/@@@',
|
|
11164
|
+
isAvilableInBrowser: false,
|
|
11165
|
+
// <- Note: [🌏] Only `MarkdownScraper` makes sense to be available in the browser, for scraping non-markdown sources in the browser use a remote server
|
|
11166
|
+
requiredExecutables: [
|
|
11167
|
+
/* @@@ 'Pandoc' */
|
|
11168
|
+
],
|
|
11169
|
+
}); /* <- Note: [🤛] */
|
|
11170
|
+
/**
|
|
11171
|
+
* Registration of known scraper metadata
|
|
11172
|
+
*
|
|
11173
|
+
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available known scrapers
|
|
11174
|
+
*
|
|
11175
|
+
* @public exported from `@promptbook/core`
|
|
11176
|
+
* @public exported from `@promptbook/wizzard`
|
|
11177
|
+
* @public exported from `@promptbook/cli`
|
|
11178
|
+
*/
|
|
11179
|
+
var _BoilerplateScraperMetadataRegistration = $scrapersMetadataRegister.register(boilerplateScraperMetadata);
|
|
11180
|
+
/**
|
|
11181
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
11182
|
+
*/
|
|
11183
|
+
|
|
11083
11184
|
/**
|
|
11084
11185
|
* Metadata of the scraper
|
|
11085
11186
|
*
|
|
@@ -11171,6 +11272,40 @@ var _MarkdownScraperMetadataRegistration = $scrapersMetadataRegister.register(ma
|
|
|
11171
11272
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
11172
11273
|
*/
|
|
11173
11274
|
|
|
11275
|
+
/**
|
|
11276
|
+
* Metadata of the scraper
|
|
11277
|
+
*
|
|
11278
|
+
* @private within the scraper directory
|
|
11279
|
+
*/
|
|
11280
|
+
var markitdownScraperMetadata = $deepFreeze({
|
|
11281
|
+
title: 'Markitdown scraper',
|
|
11282
|
+
packageName: '@promptbook/markitdown',
|
|
11283
|
+
className: 'MarkitdownScraper',
|
|
11284
|
+
mimeTypes: [
|
|
11285
|
+
'application/pdf',
|
|
11286
|
+
// TODO: Make priority for scrapers and than allow all mime types here:
|
|
11287
|
+
// 'text/html',
|
|
11288
|
+
// 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
|
11289
|
+
],
|
|
11290
|
+
documentationUrl: 'https://github.com/webgptorg/promptbook/discussions/@@',
|
|
11291
|
+
isAvilableInBrowser: false,
|
|
11292
|
+
// <- Note: [🌏] Only `MarkdownScraper` makes sense to be available in the browser, for scraping non-markdown sources in the browser use a remote server
|
|
11293
|
+
requiredExecutables: [],
|
|
11294
|
+
}); /* <- Note: [🤛] */
|
|
11295
|
+
/**
|
|
11296
|
+
* Registration of known scraper metadata
|
|
11297
|
+
*
|
|
11298
|
+
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available known scrapers
|
|
11299
|
+
*
|
|
11300
|
+
* @public exported from `@promptbook/core`
|
|
11301
|
+
* @public exported from `@promptbook/wizzard`
|
|
11302
|
+
* @public exported from `@promptbook/cli`
|
|
11303
|
+
*/
|
|
11304
|
+
var _MarkitdownScraperMetadataRegistration = $scrapersMetadataRegister.register(markitdownScraperMetadata);
|
|
11305
|
+
/**
|
|
11306
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
11307
|
+
*/
|
|
11308
|
+
|
|
11174
11309
|
/**
|
|
11175
11310
|
* Metadata of the scraper
|
|
11176
11311
|
*
|
|
@@ -11180,7 +11315,7 @@ var pdfScraperMetadata = $deepFreeze({
|
|
|
11180
11315
|
title: 'Pdf scraper',
|
|
11181
11316
|
packageName: '@promptbook/pdf',
|
|
11182
11317
|
className: 'PdfScraper',
|
|
11183
|
-
mimeTypes: ['application/pdf'],
|
|
11318
|
+
mimeTypes: ['application/pdf-DISABLED'],
|
|
11184
11319
|
documentationUrl: 'https://github.com/webgptorg/promptbook/discussions/@@',
|
|
11185
11320
|
isAvilableInBrowser: false,
|
|
11186
11321
|
// <- Note: [🌏] Only `MarkdownScraper` makes sense to be available in the browser, for scraping non-markdown sources in the browser use a remote server
|
|
@@ -11310,5 +11445,5 @@ var PrefixStorage = /** @class */ (function () {
|
|
|
11310
11445
|
return PrefixStorage;
|
|
11311
11446
|
}());
|
|
11312
11447
|
|
|
11313
|
-
export { $llmToolsMetadataRegister, $llmToolsRegister, $scrapersMetadataRegister, $scrapersRegister, ADMIN_EMAIL, ADMIN_GITHUB_NAME, AbstractFormatError, BOOK_LANGUAGE_VERSION, BlackholeStorage, BoilerplateError, BoilerplateFormfactorDefinition, CLAIM, CallbackInterfaceTools, ChatbotFormfactorDefinition, CollectionError, CsvFormatDefinition, CsvFormatError, DEFAULT_BOOKS_DIRNAME, DEFAULT_BOOK_TITLE, DEFAULT_CSV_SETTINGS, DEFAULT_EXECUTIONS_CACHE_DIRNAME, DEFAULT_GET_PIPELINE_COLLECTION_FUNCTION_NAME, 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_TASK_TITLE, EXPECTATION_UNITS, EnvironmentMismatchError, ExecutionReportStringOptionsDefaults, ExpectError, FORMFACTOR_DEFINITIONS, GENERIC_PIPELINE_INTERFACE, GeneratorFormfactorDefinition, GenericFormfactorDefinition, ImageGeneratorFormfactorDefinition, KnowledgeScrapeError, LOGO_DARK_SRC, LOGO_LIGHT_SRC, LimitReachedError, MANDATORY_CSV_SETTINGS, MAX_FILENAME_LENGTH, MODEL_VARIANTS, MatcherFormfactorDefinition, MemoryStorage, MissingToolsError, MultipleLlmExecutionTools, NAME, NonTaskSectionTypes, NotFoundError, NotYetImplementedError, ORDER_OF_PIPELINE_JSON, PROMPTBOOK_ENGINE_VERSION, PROMPTBOOK_ERRORS, ParseError, PipelineExecutionError, PipelineLogicError, PipelineUrlError, PrefixStorage, RESERVED_PARAMETER_NAMES, SET_IS_VERBOSE, SectionTypes, SheetsFormfactorDefinition, TaskTypes, TextFormatDefinition, TranslatorFormfactorDefinition, UNCERTAIN_USAGE, UnexpectedError, ZERO_USAGE, _AnthropicClaudeMetadataRegistration, _AzureOpenAiMetadataRegistration, _DocumentScraperMetadataRegistration, _GoogleMetadataRegistration, _LegacyDocumentScraperMetadataRegistration, _MarkdownScraperMetadataRegistration, _OpenAiAssistantMetadataRegistration, _OpenAiMetadataRegistration, _PdfScraperMetadataRegistration, _WebsiteScraperMetadataRegistration, addUsage, assertsExecutionSuccessful, book, cacheLlmTools, collectionToJson, compilePipeline, countTotalUsage, createCollectionFromJson, createCollectionFromPromise, createCollectionFromUrl, createLlmToolsFromConfiguration, createPipelineExecutor, createSubcollection, embeddingVectorToString, executionReportJsonToString, extractParameterNamesFromTask, getPipelineInterface, isPassingExpectations, isPipelineImplementingInterface, isPipelineInterfacesEqual, isPipelinePrepared, isValidPipelineString, joinLlmExecutionTools, limitTotalUsage, makeKnowledgeSourceHandler, parsePipeline, pipelineJsonToString, prepareKnowledgePieces, preparePersona, preparePipeline, prepareTasks, prettifyPipelineString, unpreparePipeline, usageToHuman, usageToWorktime, validatePipeline, validatePipelineString };
|
|
11448
|
+
export { $llmToolsMetadataRegister, $llmToolsRegister, $scrapersMetadataRegister, $scrapersRegister, ADMIN_EMAIL, ADMIN_GITHUB_NAME, AbstractFormatError, BOOK_LANGUAGE_VERSION, BlackholeStorage, BoilerplateError, BoilerplateFormfactorDefinition, CLAIM, CallbackInterfaceTools, ChatbotFormfactorDefinition, CollectionError, CsvFormatDefinition, CsvFormatError, DEFAULT_BOOKS_DIRNAME, DEFAULT_BOOK_TITLE, DEFAULT_CSV_SETTINGS, DEFAULT_EXECUTIONS_CACHE_DIRNAME, DEFAULT_GET_PIPELINE_COLLECTION_FUNCTION_NAME, 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_TASK_TITLE, EXPECTATION_UNITS, EnvironmentMismatchError, ExecutionReportStringOptionsDefaults, ExpectError, FORMFACTOR_DEFINITIONS, GENERIC_PIPELINE_INTERFACE, GeneratorFormfactorDefinition, GenericFormfactorDefinition, ImageGeneratorFormfactorDefinition, KnowledgeScrapeError, LOGO_DARK_SRC, LOGO_LIGHT_SRC, LimitReachedError, MANDATORY_CSV_SETTINGS, MAX_FILENAME_LENGTH, MODEL_VARIANTS, MatcherFormfactorDefinition, MemoryStorage, MissingToolsError, MultipleLlmExecutionTools, NAME, NonTaskSectionTypes, NotFoundError, NotYetImplementedError, ORDER_OF_PIPELINE_JSON, PROMPTBOOK_ENGINE_VERSION, PROMPTBOOK_ERRORS, ParseError, PipelineExecutionError, PipelineLogicError, PipelineUrlError, PrefixStorage, RESERVED_PARAMETER_NAMES, SET_IS_VERBOSE, SectionTypes, SheetsFormfactorDefinition, TaskTypes, TextFormatDefinition, TranslatorFormfactorDefinition, UNCERTAIN_USAGE, UnexpectedError, ZERO_USAGE, _AnthropicClaudeMetadataRegistration, _AzureOpenAiMetadataRegistration, _BoilerplateScraperMetadataRegistration, _DocumentScraperMetadataRegistration, _GoogleMetadataRegistration, _LegacyDocumentScraperMetadataRegistration, _MarkdownScraperMetadataRegistration, _MarkitdownScraperMetadataRegistration, _OpenAiAssistantMetadataRegistration, _OpenAiMetadataRegistration, _PdfScraperMetadataRegistration, _WebsiteScraperMetadataRegistration, addUsage, assertsExecutionSuccessful, book, cacheLlmTools, collectionToJson, compilePipeline, countTotalUsage, createCollectionFromJson, createCollectionFromPromise, createCollectionFromUrl, createLlmToolsFromConfiguration, createPipelineExecutor, createSubcollection, embeddingVectorToString, executionReportJsonToString, extractParameterNamesFromTask, getPipelineInterface, isPassingExpectations, isPipelineImplementingInterface, isPipelineInterfacesEqual, isPipelinePrepared, isValidPipelineString, joinLlmExecutionTools, limitTotalUsage, makeKnowledgeSourceHandler, parsePipeline, pipelineJsonToString, prepareKnowledgePieces, preparePersona, preparePipeline, prepareTasks, prettifyPipelineString, unpreparePipeline, usageToHuman, usageToWorktime, validatePipeline, validatePipelineString };
|
|
11314
11449
|
//# sourceMappingURL=index.es.js.map
|