@promptbook/core 0.81.0-17 → 0.81.0-18
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/esm/index.es.js +71 -4
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/core.index.d.ts +4 -0
- package/esm/typings/src/pipeline/book-notation.d.ts +15 -0
- package/esm/typings/src/pipeline/isValidPipelineString.d.ts +11 -0
- package/esm/typings/src/pipeline/isValidPipelineString.test.d.ts +4 -0
- package/esm/typings/src/scrapers/website/createWebsiteScraper.d.ts +3 -1
- package/esm/typings/src/scrapers/website/register-metadata.d.ts +1 -1
- package/package.json +1 -1
- package/umd/index.umd.js +72 -3
- package/umd/index.umd.js.map +1 -1
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.81.0-
|
|
28
|
+
var PROMPTBOOK_ENGINE_VERSION = '0.81.0-17';
|
|
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
|
|
@@ -148,6 +148,11 @@ function __spreadArray(to, from, pack) {
|
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
function __makeTemplateObject(cooked, raw) {
|
|
154
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
155
|
+
return cooked;
|
|
151
156
|
}
|
|
152
157
|
|
|
153
158
|
/**
|
|
@@ -3545,6 +3550,23 @@ function arrayableToArray(input) {
|
|
|
3545
3550
|
return [input];
|
|
3546
3551
|
}
|
|
3547
3552
|
|
|
3553
|
+
/**
|
|
3554
|
+
* Just says that the variable is not used but should be kept
|
|
3555
|
+
* No side effects.
|
|
3556
|
+
*
|
|
3557
|
+
* Note: It can be usefull for:
|
|
3558
|
+
*
|
|
3559
|
+
* 1) Suppressing eager optimization of unused imports
|
|
3560
|
+
* 2) Suppressing eslint errors of unused variables in the tests
|
|
3561
|
+
* 3) Keeping the type of the variable for type testing
|
|
3562
|
+
*
|
|
3563
|
+
* @param value any values
|
|
3564
|
+
* @returns void
|
|
3565
|
+
* @private within the repository
|
|
3566
|
+
*/
|
|
3567
|
+
function keepUnused() {
|
|
3568
|
+
}
|
|
3569
|
+
|
|
3548
3570
|
/**
|
|
3549
3571
|
* Replaces parameters in template with values from parameters object
|
|
3550
3572
|
*
|
|
@@ -9223,7 +9245,7 @@ function precompilePipeline(pipelineString) {
|
|
|
9223
9245
|
var returnStatement_1 = pipelineStringLines.pop();
|
|
9224
9246
|
var prompt_1 = spaceTrim$1(pipelineStringLines.join('\n'));
|
|
9225
9247
|
pipelineString = spaceTrim$1(function (block) { return "\n # ".concat(DEFAULT_TITLE /* <- TODO: !!!!!! Title for flat pipelines */, "\n\n ## Prompt\n\n ```\n ").concat(block(prompt_1), "\n ```\n\n ").concat(returnStatement_1, "\n "); });
|
|
9226
|
-
// <- TODO: !!!!!! Use `
|
|
9248
|
+
// <- TODO: !!!!!! Use book` notation
|
|
9227
9249
|
// console.log(pipelineString);
|
|
9228
9250
|
}
|
|
9229
9251
|
// ==============
|
|
@@ -10956,6 +10978,48 @@ var _OpenAiAssistantMetadataRegistration = $llmToolsMetadataRegister.register({
|
|
|
10956
10978
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
10957
10979
|
*/
|
|
10958
10980
|
|
|
10981
|
+
/**
|
|
10982
|
+
* Function `isValidPipelineString` will validate the if the string is a valid pipeline string
|
|
10983
|
+
* It does not check if the string is fully logically correct, but if it is a string that can be a pipeline string or the string looks completely different.
|
|
10984
|
+
*
|
|
10985
|
+
* @public exported from `@promptbook/core`
|
|
10986
|
+
*/
|
|
10987
|
+
function isValidPipelineString(value) {
|
|
10988
|
+
// TODO: !!!!!! Implement the validation + add false tests
|
|
10989
|
+
return true;
|
|
10990
|
+
}
|
|
10991
|
+
/**
|
|
10992
|
+
* TODO: [🧠][🈴] Where is the best location for this file
|
|
10993
|
+
*/
|
|
10994
|
+
|
|
10995
|
+
/**
|
|
10996
|
+
* Function for notating a pipeline with a book\`...\ notation as template literal
|
|
10997
|
+
*
|
|
10998
|
+
* @param strings @@@
|
|
10999
|
+
* @param values @@@
|
|
11000
|
+
* @returns the pipeline string
|
|
11001
|
+
* @public exported from `@promptbook/core`
|
|
11002
|
+
*/
|
|
11003
|
+
function book(strings) {
|
|
11004
|
+
var values = [];
|
|
11005
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
11006
|
+
values[_i - 1] = arguments[_i];
|
|
11007
|
+
}
|
|
11008
|
+
if (strings.length !== 1 && values.length !== 0) {
|
|
11009
|
+
throw new NotYetImplementedError("Only one string without interpolated value is supported for now in book`...` notation");
|
|
11010
|
+
}
|
|
11011
|
+
var pipelineString = strings[0];
|
|
11012
|
+
pipelineString = spaceTrim(pipelineString);
|
|
11013
|
+
return pipelineString;
|
|
11014
|
+
}
|
|
11015
|
+
keepUnused(book(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n !!!!!! Remove\n"], ["\n !!!!!! Remove\n"]))));
|
|
11016
|
+
var templateObject_1;
|
|
11017
|
+
/**
|
|
11018
|
+
* TODO: !!!!!! Use book\`...\ notation instead of as PipelineString
|
|
11019
|
+
* TODO: [🧠][🈴] Where is the best location for this file
|
|
11020
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
11021
|
+
*/
|
|
11022
|
+
|
|
10959
11023
|
/**
|
|
10960
11024
|
* Metadata of the scraper
|
|
10961
11025
|
*
|
|
@@ -11083,7 +11147,10 @@ var websiteScraperMetadata = $deepFreeze({
|
|
|
11083
11147
|
className: 'WebsiteScraper',
|
|
11084
11148
|
mimeTypes: ['text/html'],
|
|
11085
11149
|
documentationUrl: 'https://github.com/webgptorg/promptbook/discussions/@@',
|
|
11086
|
-
isAvilableInBrowser:
|
|
11150
|
+
isAvilableInBrowser: true,
|
|
11151
|
+
// <- TODO: !!!!!!! Is it available in browser?
|
|
11152
|
+
// <- TODO: !!!!!!! Is toggling this to true enough to make it available in browser?
|
|
11153
|
+
// <- TODO: Maybe make it available in browser
|
|
11087
11154
|
requiredExecutables: [],
|
|
11088
11155
|
}); /* <- Note: [🤛] */
|
|
11089
11156
|
/**
|
|
@@ -11181,5 +11248,5 @@ var PrefixStorage = /** @class */ (function () {
|
|
|
11181
11248
|
return PrefixStorage;
|
|
11182
11249
|
}());
|
|
11183
11250
|
|
|
11184
|
-
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_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_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, cacheLlmTools, collectionToJson, compilePipeline, countTotalUsage, createCollectionFromJson, createCollectionFromPromise, createCollectionFromUrl, createLlmToolsFromConfiguration, createPipelineExecutor, createSubcollection, embeddingVectorToString, executionReportJsonToString, extractParameterNamesFromTask, getPipelineInterface, isPassingExpectations, isPipelineImplementingInterface, isPipelineInterfacesEqual, isPipelinePrepared, joinLlmExecutionTools, limitTotalUsage, makeKnowledgeSourceHandler, pipelineJsonToString, precompilePipeline, prepareKnowledgePieces, preparePersona, preparePipeline, prepareTasks, prettifyPipelineString, unpreparePipeline, usageToHuman, usageToWorktime, validatePipeline };
|
|
11251
|
+
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_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_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, pipelineJsonToString, precompilePipeline, prepareKnowledgePieces, preparePersona, preparePipeline, prepareTasks, prettifyPipelineString, unpreparePipeline, usageToHuman, usageToWorktime, validatePipeline };
|
|
11185
11252
|
//# sourceMappingURL=index.es.js.map
|