@promptbook/node 0.81.0-7 → 0.81.0-8
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 +42 -2
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/node.index.d.ts +2 -0
- package/esm/typings/src/other/templates/getBookTemplate.d.ts +10 -1
- package/esm/typings/src/wizzard/wizzard.d.ts +19 -0
- package/package.json +2 -2
- package/umd/index.umd.js +42 -1
- package/umd/index.umd.js.map +1 -1
package/esm/index.es.js
CHANGED
|
@@ -28,7 +28,7 @@ var BOOK_LANGUAGE_VERSION = '1.0.0';
|
|
|
28
28
|
* @generated
|
|
29
29
|
* @see https://github.com/webgptorg/promptbook
|
|
30
30
|
*/
|
|
31
|
-
var PROMPTBOOK_ENGINE_VERSION = '0.81.0-
|
|
31
|
+
var PROMPTBOOK_ENGINE_VERSION = '0.81.0-7';
|
|
32
32
|
/**
|
|
33
33
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
34
34
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -11166,5 +11166,45 @@ function $execCommands(_a) {
|
|
|
11166
11166
|
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
11167
11167
|
*/
|
|
11168
11168
|
|
|
11169
|
-
|
|
11169
|
+
/**
|
|
11170
|
+
* @@@
|
|
11171
|
+
*
|
|
11172
|
+
* @public exported from `@promptbook/node`
|
|
11173
|
+
*/
|
|
11174
|
+
var wizzard = {
|
|
11175
|
+
/**
|
|
11176
|
+
* @@@!!!!!!
|
|
11177
|
+
*/
|
|
11178
|
+
run: function (book, inputParameters, onProgress) {
|
|
11179
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
11180
|
+
var tools, collection, pipeline, pipelineExecutor, result;
|
|
11181
|
+
return __generator(this, function (_a) {
|
|
11182
|
+
switch (_a.label) {
|
|
11183
|
+
case 0: return [4 /*yield*/, $provideExecutionToolsForNode()];
|
|
11184
|
+
case 1:
|
|
11185
|
+
tools = _a.sent();
|
|
11186
|
+
return [4 /*yield*/, createCollectionFromDirectory('./books', tools)];
|
|
11187
|
+
case 2:
|
|
11188
|
+
collection = _a.sent();
|
|
11189
|
+
return [4 /*yield*/, collection.getPipelineByUrl(book)];
|
|
11190
|
+
case 3:
|
|
11191
|
+
pipeline = _a.sent();
|
|
11192
|
+
pipelineExecutor = createPipelineExecutor({ pipeline: pipeline, tools: tools });
|
|
11193
|
+
return [4 /*yield*/, pipelineExecutor(inputParameters, onProgress)];
|
|
11194
|
+
case 4:
|
|
11195
|
+
result = _a.sent();
|
|
11196
|
+
// ▶ Fail if the execution was not successful
|
|
11197
|
+
assertsExecutionSuccessful(result);
|
|
11198
|
+
// ▶ Return the result
|
|
11199
|
+
return [2 /*return*/, result];
|
|
11200
|
+
}
|
|
11201
|
+
});
|
|
11202
|
+
});
|
|
11203
|
+
},
|
|
11204
|
+
};
|
|
11205
|
+
/**
|
|
11206
|
+
* TODO: !!!!!! Add to readmes - one markdown here imported in all packages
|
|
11207
|
+
*/
|
|
11208
|
+
|
|
11209
|
+
export { $execCommand, $execCommands, $provideExecutablesForNode, $provideExecutionToolsForNode, $provideFilesystemForNode, $provideLlmToolsConfigurationFromEnv, $provideLlmToolsFromEnv, $provideScrapersForNode, BOOK_LANGUAGE_VERSION, FileCacheStorage, PROMPTBOOK_ENGINE_VERSION, createCollectionFromDirectory, wizzard };
|
|
11170
11210
|
//# sourceMappingURL=index.es.js.map
|