@promptbook/node 0.81.0-6 → 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 CHANGED
@@ -18,15 +18,17 @@ import sha256 from 'crypto-js/sha256';
18
18
  /**
19
19
  * The version of the Book language
20
20
  *
21
+ * @generated
21
22
  * @see https://github.com/webgptorg/book
22
23
  */
23
24
  var BOOK_LANGUAGE_VERSION = '1.0.0';
24
25
  /**
25
26
  * The version of the Promptbook engine
26
27
  *
28
+ * @generated
27
29
  * @see https://github.com/webgptorg/promptbook
28
30
  */
29
- var PROMPTBOOK_ENGINE_VERSION = '0.81.0-5';
31
+ var PROMPTBOOK_ENGINE_VERSION = '0.81.0-7';
30
32
  /**
31
33
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
32
34
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -11164,5 +11166,45 @@ function $execCommands(_a) {
11164
11166
  * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
11165
11167
  */
11166
11168
 
11167
- export { $execCommand, $execCommands, $provideExecutablesForNode, $provideExecutionToolsForNode, $provideFilesystemForNode, $provideLlmToolsConfigurationFromEnv, $provideLlmToolsFromEnv, $provideScrapersForNode, BOOK_LANGUAGE_VERSION, FileCacheStorage, PROMPTBOOK_ENGINE_VERSION, createCollectionFromDirectory };
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 };
11168
11210
  //# sourceMappingURL=index.es.js.map