@promptbook/node 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.
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/node",
3
- "version": "0.92.0-18",
3
+ "version": "0.92.0-20",
4
4
  "description": "It's time for a paradigm shift. The future of software in plain English, French or Latin",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -51,7 +51,7 @@
51
51
  "module": "./esm/index.es.js",
52
52
  "typings": "./esm/typings/src/_packages/node.index.d.ts",
53
53
  "peerDependencies": {
54
- "@promptbook/core": "0.92.0-18"
54
+ "@promptbook/core": "0.92.0-20"
55
55
  },
56
56
  "dependencies": {
57
57
  "colors": "1.4.0",
package/umd/index.umd.js CHANGED
@@ -46,7 +46,7 @@
46
46
  * @generated
47
47
  * @see https://github.com/webgptorg/promptbook
48
48
  */
49
- const PROMPTBOOK_ENGINE_VERSION = '0.92.0-18';
49
+ const PROMPTBOOK_ENGINE_VERSION = '0.92.0-20';
50
50
  /**
51
51
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
52
52
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -1678,12 +1678,18 @@
1678
1678
  // Note: Ignoring `pipeline.preparations` @@@
1679
1679
  // Note: Ignoring `pipeline.knowledgePieces` @@@
1680
1680
  if (pipeline.title === undefined || pipeline.title === '' || pipeline.title === DEFAULT_BOOK_TITLE) {
1681
+ // TODO: !!! Comment this out
1682
+ console.log('Pipeline is not prepared because title is undefined or empty', pipeline);
1681
1683
  return false;
1682
1684
  }
1683
1685
  if (!pipeline.personas.every((persona) => persona.modelsRequirements !== undefined)) {
1686
+ // TODO: !!! Comment this out
1687
+ console.log('Pipeline is not prepared because personas are not prepared', pipeline.personas);
1684
1688
  return false;
1685
1689
  }
1686
1690
  if (!pipeline.knowledgeSources.every((knowledgeSource) => knowledgeSource.preparationIds !== undefined)) {
1691
+ // TODO: !!! Comment this out
1692
+ console.log('Pipeline is not prepared because knowledge sources are not prepared', pipeline.knowledgeSources);
1687
1693
  return false;
1688
1694
  }
1689
1695
  /*
@@ -4301,7 +4307,7 @@
4301
4307
  const usedParameterNames = extractParameterNamesFromTask(currentTask);
4302
4308
  const dependentParameterNames = new Set(currentTask.dependentParameterNames);
4303
4309
  // TODO: [👩🏾‍🤝‍👩🏻] Use here `mapAvailableToExpectedParameters`
4304
- if (union(difference(usedParameterNames, dependentParameterNames), difference(dependentParameterNames, usedParameterNames)).size !== 0) {
4310
+ if (difference(union(difference(usedParameterNames, dependentParameterNames), difference(dependentParameterNames, usedParameterNames)), new Set(RESERVED_PARAMETER_NAMES)).size !== 0) {
4305
4311
  throw new UnexpectedError(spaceTrim.spaceTrim((block) => `
4306
4312
  Dependent parameters are not consistent with used parameters:
4307
4313