@promptbook/node 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 +2 -2
- package/umd/index.umd.js +16 -8
- package/umd/index.umd.js.map +1 -1
package/esm/index.es.js
CHANGED
|
@@ -30,7 +30,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
|
|
|
30
30
|
* @generated
|
|
31
31
|
* @see https://github.com/webgptorg/promptbook
|
|
32
32
|
*/
|
|
33
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.92.0-
|
|
33
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.92.0-7';
|
|
34
34
|
/**
|
|
35
35
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
36
36
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -4831,18 +4831,26 @@ async function preparePersona(personaDescription, tools, options) {
|
|
|
4831
4831
|
}).asPromise();
|
|
4832
4832
|
const { outputParameters } = result;
|
|
4833
4833
|
const { modelsRequirements: modelsRequirementsJson } = outputParameters;
|
|
4834
|
-
|
|
4834
|
+
let modelsRequirementsUnchecked = jsonParse(modelsRequirementsJson);
|
|
4835
4835
|
if (isVerbose) {
|
|
4836
4836
|
console.info(`PERSONA ${personaDescription}`, modelsRequirementsUnchecked);
|
|
4837
4837
|
}
|
|
4838
4838
|
if (!Array.isArray(modelsRequirementsUnchecked)) {
|
|
4839
|
-
|
|
4839
|
+
// <- TODO: Book should have syntax and system to enforce shape of JSON
|
|
4840
|
+
modelsRequirementsUnchecked = [modelsRequirementsUnchecked];
|
|
4841
|
+
/*
|
|
4842
|
+
throw new UnexpectedError(
|
|
4843
|
+
spaceTrim(
|
|
4844
|
+
(block) => `
|
|
4840
4845
|
Invalid \`modelsRequirements\`:
|
|
4841
4846
|
|
|
4842
4847
|
\`\`\`json
|
|
4843
4848
|
${block(JSON.stringify(modelsRequirementsUnchecked, null, 4))}
|
|
4844
4849
|
\`\`\`
|
|
4845
|
-
|
|
4850
|
+
`,
|
|
4851
|
+
),
|
|
4852
|
+
);
|
|
4853
|
+
*/
|
|
4846
4854
|
}
|
|
4847
4855
|
const modelsRequirements = modelsRequirementsUnchecked.map((modelRequirements) => ({
|
|
4848
4856
|
modelVariant: 'CHAT',
|