@promptbook/markdown-utils 0.92.0-18 → 0.92.0-20
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 +8 -2
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/core.index.d.ts +2 -0
- package/esm/typings/src/migrations/migratePipeline.d.ts +7 -0
- package/esm/typings/src/pipeline/PipelineJson/PipelineJson.d.ts +1 -0
- package/package.json +1 -1
- package/umd/index.umd.js +8 -2
- package/umd/index.umd.js.map +1 -1
|
@@ -105,6 +105,7 @@ import { joinLlmExecutionTools } from '../llm-providers/multiple/joinLlmExecutio
|
|
|
105
105
|
import { MultipleLlmExecutionTools } from '../llm-providers/multiple/MultipleLlmExecutionTools';
|
|
106
106
|
import { _OpenAiMetadataRegistration } from '../llm-providers/openai/register-configuration';
|
|
107
107
|
import { _OpenAiAssistantMetadataRegistration } from '../llm-providers/openai/register-configuration';
|
|
108
|
+
import { migratePipeline } from '../migrations/migratePipeline';
|
|
108
109
|
import { preparePersona } from '../personas/preparePersona';
|
|
109
110
|
import { book } from '../pipeline/book-notation';
|
|
110
111
|
import { isValidPipelineString } from '../pipeline/isValidPipelineString';
|
|
@@ -247,6 +248,7 @@ export { joinLlmExecutionTools };
|
|
|
247
248
|
export { MultipleLlmExecutionTools };
|
|
248
249
|
export { _OpenAiMetadataRegistration };
|
|
249
250
|
export { _OpenAiAssistantMetadataRegistration };
|
|
251
|
+
export { migratePipeline };
|
|
250
252
|
export { preparePersona };
|
|
251
253
|
export { book };
|
|
252
254
|
export { isValidPipelineString };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PipelineJson } from '../pipeline/PipelineJson/PipelineJson';
|
|
2
|
+
/**
|
|
3
|
+
* Migrates the pipeline to the latest version
|
|
4
|
+
*
|
|
5
|
+
* @public exported from `@promptbook/core`
|
|
6
|
+
*/
|
|
7
|
+
export declare function migratePipeline(deprecatedPipeline: PipelineJson): PipelineJson;
|
|
@@ -103,6 +103,7 @@ export type PipelineJson = {
|
|
|
103
103
|
}>;
|
|
104
104
|
};
|
|
105
105
|
/**
|
|
106
|
+
* TODO: [🌪] Make type for deprecated pipelines
|
|
106
107
|
* TODO: [🛳] Default PERSONA for the pipeline `defaultPersonaName` (same as `defaultModelRequirements`)
|
|
107
108
|
* TODO: [🍙] Make some standard order of json properties
|
|
108
109
|
* TODO: [🧠] Maybe wrap all {parameterNames} in brackets for example { "resultingParameterName": "{foo}" }
|
package/package.json
CHANGED
package/umd/index.umd.js
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* @generated
|
|
26
26
|
* @see https://github.com/webgptorg/promptbook
|
|
27
27
|
*/
|
|
28
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.92.0-
|
|
28
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.92.0-20';
|
|
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
|
|
@@ -1771,12 +1771,18 @@
|
|
|
1771
1771
|
// Note: Ignoring `pipeline.preparations` @@@
|
|
1772
1772
|
// Note: Ignoring `pipeline.knowledgePieces` @@@
|
|
1773
1773
|
if (pipeline.title === undefined || pipeline.title === '' || pipeline.title === DEFAULT_BOOK_TITLE) {
|
|
1774
|
+
// TODO: !!! Comment this out
|
|
1775
|
+
console.log('Pipeline is not prepared because title is undefined or empty', pipeline);
|
|
1774
1776
|
return false;
|
|
1775
1777
|
}
|
|
1776
1778
|
if (!pipeline.personas.every((persona) => persona.modelsRequirements !== undefined)) {
|
|
1779
|
+
// TODO: !!! Comment this out
|
|
1780
|
+
console.log('Pipeline is not prepared because personas are not prepared', pipeline.personas);
|
|
1777
1781
|
return false;
|
|
1778
1782
|
}
|
|
1779
1783
|
if (!pipeline.knowledgeSources.every((knowledgeSource) => knowledgeSource.preparationIds !== undefined)) {
|
|
1784
|
+
// TODO: !!! Comment this out
|
|
1785
|
+
console.log('Pipeline is not prepared because knowledge sources are not prepared', pipeline.knowledgeSources);
|
|
1780
1786
|
return false;
|
|
1781
1787
|
}
|
|
1782
1788
|
/*
|
|
@@ -5332,7 +5338,7 @@
|
|
|
5332
5338
|
const usedParameterNames = extractParameterNamesFromTask(currentTask);
|
|
5333
5339
|
const dependentParameterNames = new Set(currentTask.dependentParameterNames);
|
|
5334
5340
|
// TODO: [👩🏾🤝👩🏻] Use here `mapAvailableToExpectedParameters`
|
|
5335
|
-
if (union(difference(usedParameterNames, dependentParameterNames), difference(dependentParameterNames, usedParameterNames)).size !== 0) {
|
|
5341
|
+
if (difference(union(difference(usedParameterNames, dependentParameterNames), difference(dependentParameterNames, usedParameterNames)), new Set(RESERVED_PARAMETER_NAMES)).size !== 0) {
|
|
5336
5342
|
throw new UnexpectedError(spaceTrim.spaceTrim((block) => `
|
|
5337
5343
|
Dependent parameters are not consistent with used parameters:
|
|
5338
5344
|
|