@promptbook/legacy-documents 0.92.0-6 → 0.92.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
@@ -28,7 +28,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
28
28
  * @generated
29
29
  * @see https://github.com/webgptorg/promptbook
30
30
  */
31
- const PROMPTBOOK_ENGINE_VERSION = '0.92.0-6';
31
+ const PROMPTBOOK_ENGINE_VERSION = '0.92.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
@@ -3202,18 +3202,26 @@ async function preparePersona(personaDescription, tools, options) {
3202
3202
  }).asPromise();
3203
3203
  const { outputParameters } = result;
3204
3204
  const { modelsRequirements: modelsRequirementsJson } = outputParameters;
3205
- const modelsRequirementsUnchecked = jsonParse(modelsRequirementsJson);
3205
+ let modelsRequirementsUnchecked = jsonParse(modelsRequirementsJson);
3206
3206
  if (isVerbose) {
3207
3207
  console.info(`PERSONA ${personaDescription}`, modelsRequirementsUnchecked);
3208
3208
  }
3209
3209
  if (!Array.isArray(modelsRequirementsUnchecked)) {
3210
- throw new UnexpectedError(spaceTrim$1((block) => `
3210
+ // <- TODO: Book should have syntax and system to enforce shape of JSON
3211
+ modelsRequirementsUnchecked = [modelsRequirementsUnchecked];
3212
+ /*
3213
+ throw new UnexpectedError(
3214
+ spaceTrim(
3215
+ (block) => `
3211
3216
  Invalid \`modelsRequirements\`:
3212
3217
 
3213
3218
  \`\`\`json
3214
3219
  ${block(JSON.stringify(modelsRequirementsUnchecked, null, 4))}
3215
3220
  \`\`\`
3216
- `));
3221
+ `,
3222
+ ),
3223
+ );
3224
+ */
3217
3225
  }
3218
3226
  const modelsRequirements = modelsRequirementsUnchecked.map((modelRequirements) => ({
3219
3227
  modelVariant: 'CHAT',