@promptbook/core 0.75.0-4 → 0.75.2
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 +22 -16
- package/esm/index.es.js +30 -18
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/core.index.d.ts +6 -0
- package/esm/typings/src/_packages/utils.index.d.ts +2 -0
- package/esm/typings/src/config.d.ts +25 -0
- package/esm/typings/src/pipeline/PipelineInterface/PipelineInterface.d.ts +0 -4
- package/esm/typings/src/pipeline/PipelineInterface/getPipelineInterface.d.ts +1 -3
- package/esm/typings/src/pipeline/PipelineInterface/isPipelineImplementingInterface.d.ts +1 -4
- package/esm/typings/src/pipeline/PipelineInterface/isPipelineInterfacesEqual.d.ts +1 -4
- package/esm/typings/src/utils/organization/spaceTrim.d.ts +11 -0
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/umd/index.umd.js +32 -17
- package/umd/index.umd.js.map +1 -1
package/README.md
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
#  Promptbook
|
|
4
4
|
|
|
5
|
-
It's time for a paradigm shift! The future of software is in plain English, French or Latin.
|
|
6
|
-
|
|
7
5
|
|
|
8
6
|
|
|
9
7
|
|
|
@@ -25,10 +23,6 @@ It's time for a paradigm shift! The future of software is in plain English, Fren
|
|
|
25
23
|
|
|
26
24
|
|
|
27
25
|
|
|
28
|
-
<blockquote style="color: #ff8811">
|
|
29
|
-
<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>.
|
|
30
|
-
</blockquote>
|
|
31
|
-
|
|
32
26
|
## 📦 Package `@promptbook/core`
|
|
33
27
|
|
|
34
28
|
- Promptbooks are [divided into several](#-packages) packages, all are published from [single monorepo](https://github.com/webgptorg/promptbook).
|
|
@@ -60,7 +54,7 @@ Rest of the documentation is common for **entire promptbook ecosystem**:
|
|
|
60
54
|
|
|
61
55
|
## 🤍 The Book Abstract
|
|
62
56
|
|
|
63
|
-
|
|
57
|
+
**It's time for a paradigm shift! The future of software is in plain English, French or Latin.**
|
|
64
58
|
|
|
65
59
|
During the computer revolution, we have seen [multiple generations of computer languages](https://github.com/webgptorg/promptbook/discussions/180), from the physical rewiring of the vacuum tubes through low-level machine code to the high-level languages like Python or JavaScript. And now, we're on the edge of the **next revolution**!
|
|
66
60
|
|
|
@@ -70,11 +64,17 @@ The incredible growth in power of microprocessors and the Moore's Law have been
|
|
|
70
64
|
|
|
71
65
|
This shift is going to happen, whether we are ready for it or not. Our mission is to make it excellently, not just good.
|
|
72
66
|
|
|
73
|
-
|
|
67
|
+
**Join us in this journey!**
|
|
68
|
+
|
|
74
69
|
|
|
75
70
|
|
|
71
|
+
## 🚀 Get started
|
|
76
72
|
|
|
73
|
+
Take a look at the simple starter kit with books integrated into the **Hello World** sample applications:
|
|
77
74
|
|
|
75
|
+
- [Hello Book](https://github.com/webgptorg/hello-world)
|
|
76
|
+
- [Hello Book in Node.js](https://github.com/webgptorg/hello-world-node-js)
|
|
77
|
+
- [Hello Book in Next.js](https://github.com/webgptorg/hello-world-next-js)
|
|
78
78
|
|
|
79
79
|
|
|
80
80
|
|
|
@@ -94,7 +94,7 @@ Promptbook project is ecosystem of multiple projects and tools, following is a l
|
|
|
94
94
|
<tbody>
|
|
95
95
|
<tr>
|
|
96
96
|
<td>Core</td>
|
|
97
|
-
<td>Promptbook
|
|
97
|
+
<td>Promptbook Core is a description and documentation of the basic concepts, ideas and inner workings of how Promptbook should be implemented, and defines what features must be describable by book language.</td>
|
|
98
98
|
<td rowspan=2>https://ptbk.io<br/>https://github.com/webgptorg/book</td>
|
|
99
99
|
</tr>
|
|
100
100
|
<tr>
|
|
@@ -105,17 +105,23 @@ Promptbook project is ecosystem of multiple projects and tools, following is a l
|
|
|
105
105
|
</tr>
|
|
106
106
|
<tr>
|
|
107
107
|
<td>Promptbook typescript project</td>
|
|
108
|
-
<td>
|
|
108
|
+
<td>Promptbook implementation in TypeScript released as multiple NPM packages</td>
|
|
109
109
|
<td>https://github.com/webgptorg/promptbook + Multiple packages on NPM</td>
|
|
110
110
|
</tr>
|
|
111
111
|
<tr>
|
|
112
112
|
<td>Promptbook studio</td>
|
|
113
|
-
<td>
|
|
114
|
-
<td
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
<td>
|
|
113
|
+
<td>Studio to write Books and instantly publish them as miniapps</td>
|
|
114
|
+
<td>
|
|
115
|
+
https://promptbook.studio<br/>
|
|
116
|
+
https://github.com/hejny/promptbook-studio</td>
|
|
117
|
+
</tr><tr>
|
|
118
|
+
<td>Hello World</td>
|
|
119
|
+
<td>Simple starter kit with Books integrated into the sample applications</td>
|
|
120
|
+
<td>
|
|
121
|
+
https://github.com/webgptorg/hello-world<br/>
|
|
122
|
+
https://github.com/webgptorg/hello-world-node-js<br/>
|
|
123
|
+
https://github.com/webgptorg/hello-world-next-js
|
|
124
|
+
</td>
|
|
119
125
|
</tr>
|
|
120
126
|
</tbody>
|
|
121
127
|
</table>
|
package/esm/index.es.js
CHANGED
|
@@ -22,7 +22,7 @@ var BOOK_LANGUAGE_VERSION = '1.0.0';
|
|
|
22
22
|
*
|
|
23
23
|
* @see https://github.com/webgptorg/promptbook
|
|
24
24
|
*/
|
|
25
|
-
var PROMPTBOOK_ENGINE_VERSION = '0.75.
|
|
25
|
+
var PROMPTBOOK_ENGINE_VERSION = '0.75.1';
|
|
26
26
|
/**
|
|
27
27
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
28
28
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -642,6 +642,14 @@ function $asDeeplyFrozenSerializableJson(name, objectValue) {
|
|
|
642
642
|
* @private within the repository
|
|
643
643
|
*/
|
|
644
644
|
var GENERATOR_WARNING = "\u26A0\uFE0F WARNING: This code has been generated so that any manual changes will be overwritten";
|
|
645
|
+
/**
|
|
646
|
+
* Name for the Promptbook
|
|
647
|
+
*
|
|
648
|
+
* TODO: [🗽] Unite branding and make single place for it
|
|
649
|
+
*
|
|
650
|
+
* @public exported from `@promptbook/core`
|
|
651
|
+
*/
|
|
652
|
+
var NAME = "Promptbook";
|
|
645
653
|
/**
|
|
646
654
|
* Claim for the Promptbook
|
|
647
655
|
*
|
|
@@ -651,6 +659,22 @@ var GENERATOR_WARNING = "\u26A0\uFE0F WARNING: This code has been generated so t
|
|
|
651
659
|
*/
|
|
652
660
|
var CLAIM = "It's time for a paradigm shift. The future of software in plain English, French or Latin";
|
|
653
661
|
// <- TODO: [🐊] Pick the best claim
|
|
662
|
+
/**
|
|
663
|
+
* Logo for the light theme
|
|
664
|
+
*
|
|
665
|
+
* TODO: [🗽] Unite branding and make single place for it
|
|
666
|
+
*
|
|
667
|
+
* @public exported from `@promptbook/core`
|
|
668
|
+
*/
|
|
669
|
+
var LOGO_LIGHT_SRC = "https://promptbook.studio/_next/static/media/promptbook-logo.b21f0c70.png";
|
|
670
|
+
/**
|
|
671
|
+
* Logo for the dark theme
|
|
672
|
+
*
|
|
673
|
+
* TODO: [🗽] Unite branding and make single place for it
|
|
674
|
+
*
|
|
675
|
+
* @public exported from `@promptbook/core`
|
|
676
|
+
*/
|
|
677
|
+
var LOGO_DARK_SRC = "https://promptbook.studio/_next/static/media/promptbook-logo-white.09887cbc.png";
|
|
654
678
|
/**
|
|
655
679
|
* When the title is not provided, the default title is used
|
|
656
680
|
*
|
|
@@ -1264,7 +1288,6 @@ function validatePipelineCore(pipeline) {
|
|
|
1264
1288
|
while (unresovedTasks.length > 0) {
|
|
1265
1289
|
_loop_3();
|
|
1266
1290
|
}
|
|
1267
|
-
// TODO: !!!!!! Test that pipeline interface implements declared formfactor interface
|
|
1268
1291
|
}
|
|
1269
1292
|
/**
|
|
1270
1293
|
* TODO: !! [🧞♀️] Do not allow joker + foreach
|
|
@@ -10031,6 +10054,7 @@ var _OpenAiAssistantMetadataRegistration = $llmToolsMetadataRegister.register({
|
|
|
10031
10054
|
/**
|
|
10032
10055
|
* @@@
|
|
10033
10056
|
*
|
|
10057
|
+
* @deprecated https://github.com/webgptorg/promptbook/pull/186
|
|
10034
10058
|
* @see https://github.com/webgptorg/promptbook/discussions/171
|
|
10035
10059
|
*
|
|
10036
10060
|
* @public exported from `@promptbook/core`
|
|
@@ -10068,8 +10092,6 @@ function getPipelineInterface(pipeline) {
|
|
|
10068
10092
|
var name2 = _b.name;
|
|
10069
10093
|
return name1.localeCompare(name2);
|
|
10070
10094
|
});
|
|
10071
|
-
// <- TODO: [🧠] Should we compare a descriptions?
|
|
10072
|
-
// <- TODO: [🧠][🛴] Maybe add type + expectations into the intefrace, like "a person name"
|
|
10073
10095
|
}
|
|
10074
10096
|
}
|
|
10075
10097
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
@@ -10081,29 +10103,23 @@ function getPipelineInterface(pipeline) {
|
|
|
10081
10103
|
}
|
|
10082
10104
|
return $deepFreeze(pipelineInterface);
|
|
10083
10105
|
}
|
|
10084
|
-
/**
|
|
10085
|
-
* TODO: !!!!!! Write unit test
|
|
10086
|
-
*/
|
|
10087
10106
|
|
|
10088
10107
|
/**
|
|
10089
10108
|
* @@@
|
|
10090
10109
|
*
|
|
10110
|
+
* @deprecated https://github.com/webgptorg/promptbook/pull/186
|
|
10091
10111
|
* @see https://github.com/webgptorg/promptbook/discussions/171
|
|
10092
10112
|
*
|
|
10093
10113
|
* @public exported from `@promptbook/core`
|
|
10094
10114
|
*/
|
|
10095
10115
|
function isPipelineInterfacesEqual(pipelineInterface1, pipelineInterface2) {
|
|
10096
|
-
|
|
10097
|
-
return JSON.stringify(pipelineInterface1) === JSON.stringify(pipelineInterface2);
|
|
10116
|
+
return JSON.stringify(Object.keys(pipelineInterface1)) === JSON.stringify(Object.keys(pipelineInterface2));
|
|
10098
10117
|
}
|
|
10099
|
-
/**
|
|
10100
|
-
* TODO: [🧠] !!! Return more states than true/false - 'IDENTICAL' |'IDENTICAL_UNPREPARED' | 'IDENTICAL_INTERFACE' | 'DIFFERENT'
|
|
10101
|
-
* TODO: !!! Write unit test
|
|
10102
|
-
*/
|
|
10103
10118
|
|
|
10104
10119
|
/**
|
|
10105
10120
|
* @@@
|
|
10106
10121
|
*
|
|
10122
|
+
* @deprecated https://github.com/webgptorg/promptbook/pull/186
|
|
10107
10123
|
* @see https://github.com/webgptorg/promptbook/discussions/171
|
|
10108
10124
|
*
|
|
10109
10125
|
* @public exported from `@promptbook/core`
|
|
@@ -10112,10 +10128,6 @@ function isPipelineImplementingInterface(options) {
|
|
|
10112
10128
|
var pipeline = options.pipeline, pipelineInterface = options.pipelineInterface;
|
|
10113
10129
|
return isPipelineInterfacesEqual(getPipelineInterface(pipeline), pipelineInterface);
|
|
10114
10130
|
}
|
|
10115
|
-
/**
|
|
10116
|
-
* TODO: !!!!!! Test real implementing NOT equality
|
|
10117
|
-
* TODO: !!!!!! Write unit test
|
|
10118
|
-
*/
|
|
10119
10131
|
|
|
10120
10132
|
/**
|
|
10121
10133
|
* Metadata of the scraper
|
|
@@ -10337,5 +10349,5 @@ var PrefixStorage = /** @class */ (function () {
|
|
|
10337
10349
|
return PrefixStorage;
|
|
10338
10350
|
}());
|
|
10339
10351
|
|
|
10340
|
-
export { $llmToolsMetadataRegister, $llmToolsRegister, $scrapersMetadataRegister, $scrapersRegister, AbstractFormatError, BOOK_LANGUAGE_VERSION, BlackholeStorage, BoilerplateFormfactorDefinition, CLAIM, CallbackInterfaceTools, ChatbotFormfactorDefinition, CollectionError, CsvFormatDefinition, CsvFormatError, DEFAULT_BOOKS_DIRNAME, DEFAULT_CSV_SETTINGS, DEFAULT_EXECUTIONS_CACHE_DIRNAME, DEFAULT_INTERMEDIATE_FILES_STRATEGY, DEFAULT_IS_AUTO_INSTALLED, DEFAULT_IS_VERBOSE, DEFAULT_MAX_EXECUTION_ATTEMPTS, DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH, DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL, DEFAULT_MAX_PARALLEL_COUNT, DEFAULT_PIPELINE_COLLECTION_BASE_FILENAME, DEFAULT_REMOTE_URL, DEFAULT_REMOTE_URL_PATH, DEFAULT_SCRAPE_CACHE_DIRNAME, DEFAULT_TITLE, ERRORS, EXPECTATION_UNITS, EnvironmentMismatchError, ExecutionReportStringOptionsDefaults, ExpectError, FORMFACTOR_DEFINITIONS, GENERIC_PIPELINE_INTERFACE, GeneratorFormfactorDefinition, GenericFormfactorDefinition, KnowledgeScrapeError, LimitReachedError, MANDATORY_CSV_SETTINGS, MAX_FILENAME_LENGTH, MODEL_VARIANTS, MatcherFormfactorDefinition, MemoryStorage, MissingToolsError, MultipleLlmExecutionTools, NonTaskSectionTypes, NotFoundError, NotYetImplementedError, PROMPTBOOK_ENGINE_VERSION, ParseError, PipelineExecutionError, PipelineLogicError, PipelineUrlError, PrefixStorage, RESERVED_PARAMETER_NAMES, SectionTypes, SheetsFormfactorDefinition, TaskTypes, TextFormatDefinition, TranslatorFormfactorDefinition, UNCERTAIN_USAGE, UnexpectedError, ZERO_USAGE, _AnthropicClaudeMetadataRegistration, _AzureOpenAiMetadataRegistration, _DocumentScraperMetadataRegistration, _LegacyDocumentScraperMetadataRegistration, _MarkdownScraperMetadataRegistration, _OpenAiAssistantMetadataRegistration, _OpenAiMetadataRegistration, _PdfScraperMetadataRegistration, _WebsiteScraperMetadataRegistration, addUsage, assertsExecutionSuccessful, cacheLlmTools, collectionToJson, countTotalUsage, createCollectionFromJson, createCollectionFromPromise, createCollectionFromUrl, createLlmToolsFromConfiguration, createPipelineExecutor, createSubcollection, embeddingVectorToString, executionReportJsonToString, getPipelineInterface, isPassingExpectations, isPipelineImplementingInterface, isPipelineInterfacesEqual, isPipelinePrepared, joinLlmExecutionTools, limitTotalUsage, makeKnowledgeSourceHandler, pipelineJsonToString, pipelineStringToJson, pipelineStringToJsonSync, prepareKnowledgePieces, preparePersona, preparePipeline, prepareTasks, prettifyPipelineString, stringifyPipelineJson, unpreparePipeline, usageToHuman, usageToWorktime, validatePipeline };
|
|
10352
|
+
export { $llmToolsMetadataRegister, $llmToolsRegister, $scrapersMetadataRegister, $scrapersRegister, AbstractFormatError, BOOK_LANGUAGE_VERSION, BlackholeStorage, BoilerplateFormfactorDefinition, CLAIM, CallbackInterfaceTools, ChatbotFormfactorDefinition, CollectionError, CsvFormatDefinition, CsvFormatError, DEFAULT_BOOKS_DIRNAME, DEFAULT_CSV_SETTINGS, DEFAULT_EXECUTIONS_CACHE_DIRNAME, DEFAULT_INTERMEDIATE_FILES_STRATEGY, DEFAULT_IS_AUTO_INSTALLED, DEFAULT_IS_VERBOSE, DEFAULT_MAX_EXECUTION_ATTEMPTS, DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH, DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL, DEFAULT_MAX_PARALLEL_COUNT, DEFAULT_PIPELINE_COLLECTION_BASE_FILENAME, DEFAULT_REMOTE_URL, DEFAULT_REMOTE_URL_PATH, DEFAULT_SCRAPE_CACHE_DIRNAME, DEFAULT_TITLE, ERRORS, EXPECTATION_UNITS, EnvironmentMismatchError, ExecutionReportStringOptionsDefaults, ExpectError, FORMFACTOR_DEFINITIONS, GENERIC_PIPELINE_INTERFACE, GeneratorFormfactorDefinition, GenericFormfactorDefinition, KnowledgeScrapeError, LOGO_DARK_SRC, LOGO_LIGHT_SRC, LimitReachedError, MANDATORY_CSV_SETTINGS, MAX_FILENAME_LENGTH, MODEL_VARIANTS, MatcherFormfactorDefinition, MemoryStorage, MissingToolsError, MultipleLlmExecutionTools, NAME, NonTaskSectionTypes, NotFoundError, NotYetImplementedError, PROMPTBOOK_ENGINE_VERSION, ParseError, PipelineExecutionError, PipelineLogicError, PipelineUrlError, PrefixStorage, RESERVED_PARAMETER_NAMES, SectionTypes, SheetsFormfactorDefinition, TaskTypes, TextFormatDefinition, TranslatorFormfactorDefinition, UNCERTAIN_USAGE, UnexpectedError, ZERO_USAGE, _AnthropicClaudeMetadataRegistration, _AzureOpenAiMetadataRegistration, _DocumentScraperMetadataRegistration, _LegacyDocumentScraperMetadataRegistration, _MarkdownScraperMetadataRegistration, _OpenAiAssistantMetadataRegistration, _OpenAiMetadataRegistration, _PdfScraperMetadataRegistration, _WebsiteScraperMetadataRegistration, addUsage, assertsExecutionSuccessful, cacheLlmTools, collectionToJson, countTotalUsage, createCollectionFromJson, createCollectionFromPromise, createCollectionFromUrl, createLlmToolsFromConfiguration, createPipelineExecutor, createSubcollection, embeddingVectorToString, executionReportJsonToString, getPipelineInterface, isPassingExpectations, isPipelineImplementingInterface, isPipelineInterfacesEqual, isPipelinePrepared, joinLlmExecutionTools, limitTotalUsage, makeKnowledgeSourceHandler, pipelineJsonToString, pipelineStringToJson, pipelineStringToJsonSync, prepareKnowledgePieces, preparePersona, preparePipeline, prepareTasks, prettifyPipelineString, stringifyPipelineJson, unpreparePipeline, usageToHuman, usageToWorktime, validatePipeline };
|
|
10341
10353
|
//# sourceMappingURL=index.es.js.map
|