@promptbook/core 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 +12 -4
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/remote-server/openapi-types.d.ts +348 -6
- package/package.json +1 -1
- package/umd/index.umd.js +16 -8
- package/umd/index.umd.js.map +1 -1
package/esm/index.es.js
CHANGED
|
@@ -27,7 +27,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
|
|
|
27
27
|
* @generated
|
|
28
28
|
* @see https://github.com/webgptorg/promptbook
|
|
29
29
|
*/
|
|
30
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.92.0-
|
|
30
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.92.0-7';
|
|
31
31
|
/**
|
|
32
32
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
33
33
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -5082,18 +5082,26 @@ async function preparePersona(personaDescription, tools, options) {
|
|
|
5082
5082
|
}).asPromise();
|
|
5083
5083
|
const { outputParameters } = result;
|
|
5084
5084
|
const { modelsRequirements: modelsRequirementsJson } = outputParameters;
|
|
5085
|
-
|
|
5085
|
+
let modelsRequirementsUnchecked = jsonParse(modelsRequirementsJson);
|
|
5086
5086
|
if (isVerbose) {
|
|
5087
5087
|
console.info(`PERSONA ${personaDescription}`, modelsRequirementsUnchecked);
|
|
5088
5088
|
}
|
|
5089
5089
|
if (!Array.isArray(modelsRequirementsUnchecked)) {
|
|
5090
|
-
|
|
5090
|
+
// <- TODO: Book should have syntax and system to enforce shape of JSON
|
|
5091
|
+
modelsRequirementsUnchecked = [modelsRequirementsUnchecked];
|
|
5092
|
+
/*
|
|
5093
|
+
throw new UnexpectedError(
|
|
5094
|
+
spaceTrim(
|
|
5095
|
+
(block) => `
|
|
5091
5096
|
Invalid \`modelsRequirements\`:
|
|
5092
5097
|
|
|
5093
5098
|
\`\`\`json
|
|
5094
5099
|
${block(JSON.stringify(modelsRequirementsUnchecked, null, 4))}
|
|
5095
5100
|
\`\`\`
|
|
5096
|
-
|
|
5101
|
+
`,
|
|
5102
|
+
),
|
|
5103
|
+
);
|
|
5104
|
+
*/
|
|
5097
5105
|
}
|
|
5098
5106
|
const modelsRequirements = modelsRequirementsUnchecked.map((modelRequirements) => ({
|
|
5099
5107
|
modelVariant: 'CHAT',
|