@promptbook/cli 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
@@ -46,7 +46,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
46
46
  * @generated
47
47
  * @see https://github.com/webgptorg/promptbook
48
48
  */
49
- const PROMPTBOOK_ENGINE_VERSION = '0.92.0-6';
49
+ const PROMPTBOOK_ENGINE_VERSION = '0.92.0-7';
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
@@ -7161,18 +7161,26 @@ async function preparePersona(personaDescription, tools, options) {
7161
7161
  }).asPromise();
7162
7162
  const { outputParameters } = result;
7163
7163
  const { modelsRequirements: modelsRequirementsJson } = outputParameters;
7164
- const modelsRequirementsUnchecked = jsonParse(modelsRequirementsJson);
7164
+ let modelsRequirementsUnchecked = jsonParse(modelsRequirementsJson);
7165
7165
  if (isVerbose) {
7166
7166
  console.info(`PERSONA ${personaDescription}`, modelsRequirementsUnchecked);
7167
7167
  }
7168
7168
  if (!Array.isArray(modelsRequirementsUnchecked)) {
7169
- throw new UnexpectedError(spaceTrim((block) => `
7169
+ // <- TODO: Book should have syntax and system to enforce shape of JSON
7170
+ modelsRequirementsUnchecked = [modelsRequirementsUnchecked];
7171
+ /*
7172
+ throw new UnexpectedError(
7173
+ spaceTrim(
7174
+ (block) => `
7170
7175
  Invalid \`modelsRequirements\`:
7171
7176
 
7172
7177
  \`\`\`json
7173
7178
  ${block(JSON.stringify(modelsRequirementsUnchecked, null, 4))}
7174
7179
  \`\`\`
7175
- `));
7180
+ `,
7181
+ ),
7182
+ );
7183
+ */
7176
7184
  }
7177
7185
  const modelsRequirements = modelsRequirementsUnchecked.map((modelRequirements) => ({
7178
7186
  modelVariant: 'CHAT',