@promptbook/markitdown 0.92.0-6 → 0.92.0-7

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
@@ -26,7 +26,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
26
26
  * @generated
27
27
  * @see https://github.com/webgptorg/promptbook
28
28
  */
29
- const PROMPTBOOK_ENGINE_VERSION = '0.92.0-6';
29
+ const PROMPTBOOK_ENGINE_VERSION = '0.92.0-7';
30
30
  /**
31
31
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
32
32
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -3028,18 +3028,26 @@ async function preparePersona(personaDescription, tools, options) {
3028
3028
  }).asPromise();
3029
3029
  const { outputParameters } = result;
3030
3030
  const { modelsRequirements: modelsRequirementsJson } = outputParameters;
3031
- const modelsRequirementsUnchecked = jsonParse(modelsRequirementsJson);
3031
+ let modelsRequirementsUnchecked = jsonParse(modelsRequirementsJson);
3032
3032
  if (isVerbose) {
3033
3033
  console.info(`PERSONA ${personaDescription}`, modelsRequirementsUnchecked);
3034
3034
  }
3035
3035
  if (!Array.isArray(modelsRequirementsUnchecked)) {
3036
- throw new UnexpectedError(spaceTrim((block) => `
3036
+ // <- TODO: Book should have syntax and system to enforce shape of JSON
3037
+ modelsRequirementsUnchecked = [modelsRequirementsUnchecked];
3038
+ /*
3039
+ throw new UnexpectedError(
3040
+ spaceTrim(
3041
+ (block) => `
3037
3042
  Invalid \`modelsRequirements\`:
3038
3043
 
3039
3044
  \`\`\`json
3040
3045
  ${block(JSON.stringify(modelsRequirementsUnchecked, null, 4))}
3041
3046
  \`\`\`
3042
- `));
3047
+ `,
3048
+ ),
3049
+ );
3050
+ */
3043
3051
  }
3044
3052
  const modelsRequirements = modelsRequirementsUnchecked.map((modelRequirements) => ({
3045
3053
  modelVariant: 'CHAT',