@promptbook/documents 0.85.0-8 → 0.85.0-9
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
|
@@ -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.85.0-
|
|
31
|
+
var PROMPTBOOK_ENGINE_VERSION = '0.85.0-8';
|
|
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
|
|
@@ -2688,18 +2688,16 @@ function assertsTaskSuccessful(executionResult) {
|
|
|
2688
2688
|
*/
|
|
2689
2689
|
function createTask(options) {
|
|
2690
2690
|
var taskType = options.taskType, taskProcessCallback = options.taskProcessCallback;
|
|
2691
|
-
var taskId = "".concat(taskType.toLowerCase().substring(0, 4), "-").concat($randomToken(8 /* <- TODO:
|
|
2691
|
+
var taskId = "".concat(taskType.toLowerCase().substring(0, 4), "-").concat($randomToken(8 /* <- TODO: To global config + Use Base58 to avoid simmilar char conflicts */));
|
|
2692
2692
|
var partialResultSubject = new BehaviorSubject({});
|
|
2693
2693
|
var finalResultPromise = /* not await */ taskProcessCallback(function (newOngoingResult) {
|
|
2694
2694
|
partialResultSubject.next(newOngoingResult);
|
|
2695
2695
|
});
|
|
2696
2696
|
finalResultPromise
|
|
2697
2697
|
.catch(function (error) {
|
|
2698
|
-
// console.error('!!!!! Task failed:', error);
|
|
2699
2698
|
partialResultSubject.error(error);
|
|
2700
2699
|
})
|
|
2701
2700
|
.then(function (value) {
|
|
2702
|
-
// console.error('!!!!! Task finished:', value);
|
|
2703
2701
|
if (value) {
|
|
2704
2702
|
try {
|
|
2705
2703
|
assertsTaskSuccessful(value);
|
|
@@ -2721,9 +2719,7 @@ function createTask(options) {
|
|
|
2721
2719
|
return [4 /*yield*/, finalResultPromise];
|
|
2722
2720
|
case 1:
|
|
2723
2721
|
finalResult = _b.sent();
|
|
2724
|
-
console.error('!!!!! finalResult:', finalResult);
|
|
2725
2722
|
if (isCrashedOnError) {
|
|
2726
|
-
console.error('!!!!! isCrashedOnError:', finalResult);
|
|
2727
2723
|
assertsTaskSuccessful(finalResult);
|
|
2728
2724
|
}
|
|
2729
2725
|
return [2 /*return*/, finalResult];
|