@promptbook/types 0.59.0-24 → 0.59.0-26
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 +1 -1
- package/esm/typings/src/_packages/core.index.d.ts +2 -2
- package/esm/typings/src/config.d.ts +4 -0
- package/{umd/typings/src/conversion/validation/validatePromptbookJson.d.ts → esm/typings/src/conversion/validation/validatePromptbook.d.ts} +2 -2
- package/esm/typings/src/library/constructors/createLibraryFromJson.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +1 -1
- package/umd/typings/src/_packages/core.index.d.ts +2 -2
- package/umd/typings/src/config.d.ts +4 -0
- package/{esm/typings/src/conversion/validation/validatePromptbookJson.d.ts → umd/typings/src/conversion/validation/validatePromptbook.d.ts} +2 -2
- package/umd/typings/src/library/constructors/createLibraryFromJson.d.ts +1 -1
- /package/esm/typings/src/conversion/validation/{validatePromptbookJson-logicErrors.test.d.ts → validatePromptbook-logicErrors.test.d.ts} +0 -0
- /package/esm/typings/src/conversion/validation/{validatePromptbookJson.test.d.ts → validatePromptbook.test.d.ts} +0 -0
- /package/umd/typings/src/conversion/validation/{validatePromptbookJson-logicErrors.test.d.ts → validatePromptbook-logicErrors.test.d.ts} +0 -0
- /package/umd/typings/src/conversion/validation/{validatePromptbookJson.test.d.ts → validatePromptbook.test.d.ts} +0 -0
package/esm/index.es.js
CHANGED
|
@@ -11,7 +11,7 @@ var EXPECTATION_UNITS = ['CHARACTERS', 'WORDS', 'SENTENCES', 'LINES', 'PARAGRAPH
|
|
|
11
11
|
/**
|
|
12
12
|
* The version of the Promptbook library
|
|
13
13
|
*/
|
|
14
|
-
var PROMPTBOOK_VERSION = '0.59.0-
|
|
14
|
+
var PROMPTBOOK_VERSION = '0.59.0-25';
|
|
15
15
|
|
|
16
16
|
export { EXPECTATION_UNITS, PROMPTBOOK_VERSION };
|
|
17
17
|
//# sourceMappingURL=index.es.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { prettifyPromptbookString } from '../conversion/prettify/prettifyPromptbookString';
|
|
2
2
|
import { promptbookJsonToString } from '../conversion/promptbookJsonToString';
|
|
3
3
|
import { promptbookStringToJson } from '../conversion/promptbookStringToJson';
|
|
4
|
-
import {
|
|
4
|
+
import { validatePromptbook } from '../conversion/validation/validatePromptbook';
|
|
5
5
|
import { ExpectError } from '../errors/_ExpectError';
|
|
6
6
|
import { PromptbookExecutionError } from '../errors/PromptbookExecutionError';
|
|
7
7
|
import { PromptbookLibraryError } from '../errors/PromptbookLibraryError';
|
|
@@ -36,7 +36,7 @@ export { ExecutionTypes };
|
|
|
36
36
|
export { addUsage, assertsExecutionSuccessful, checkExpectations, executionReportJsonToString, ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults, isPassingExpectations, prepareKnowledgeFromMarkdown, prettifyPromptbookString, usageToWorktime, };
|
|
37
37
|
export { createLibraryFromJson, createLibraryFromPromise, createLibraryFromUrl, createSublibrary, libraryToJson };
|
|
38
38
|
export { SimplePromptInterfaceTools };
|
|
39
|
-
export { promptbookJsonToString, promptbookStringToJson,
|
|
39
|
+
export { promptbookJsonToString, promptbookStringToJson, validatePromptbook };
|
|
40
40
|
export { createPromptbookExecutor, MultipleLlmExecutionTools };
|
|
41
41
|
export { CallbackInterfaceTools, CallbackInterfaceToolsOptions };
|
|
42
42
|
export { ExpectError, PromptbookExecutionError, PromptbookLibraryError, PromptbookLogicError, PromptbookNotFoundError, PromptbookReferenceError, PromptbookSyntaxError, TemplateError, UnexpectedError, };
|
|
@@ -6,3 +6,7 @@ export declare const LOOP_LIMIT = 1000;
|
|
|
6
6
|
* The maximum number of iterations for a loops which adds characters one by one
|
|
7
7
|
*/
|
|
8
8
|
export declare const CHARACTER_LOOP_LIMIT = 100000;
|
|
9
|
+
/**
|
|
10
|
+
* The name of the builded promptbook library made by CLI `promptbook make` and for lookup in `createLibraryFromDirectory`
|
|
11
|
+
*/
|
|
12
|
+
export declare const PROMPTBOOK_MAKED_BASE_FILENAME = "promptbook-library";
|
|
@@ -13,7 +13,7 @@ import type { PromptbookJson } from '../../types/PromptbookJson/PromptbookJson';
|
|
|
13
13
|
* @returns the same promptbook if it is logically valid
|
|
14
14
|
* @throws {PromptbookLogicError} on logical error in the promptbook
|
|
15
15
|
*/
|
|
16
|
-
export declare function
|
|
16
|
+
export declare function validatePromptbook(promptbook: PromptbookJson): PromptbookJson;
|
|
17
17
|
/**
|
|
18
18
|
* TODO: [🧠] Work with promptbookVersion
|
|
19
19
|
* TODO: Use here some json-schema, Zod or something similar and change it to:
|
|
@@ -23,5 +23,5 @@ export declare function validatePromptbookJson(promptbook: PromptbookJson): Prom
|
|
|
23
23
|
* > * It checks:
|
|
24
24
|
* > * - it has a valid structure
|
|
25
25
|
* > * - ...
|
|
26
|
-
* > ex port function
|
|
26
|
+
* > ex port function validatePromptbook(promptbook: unknown): asserts promptbook is PromptbookJson {
|
|
27
27
|
*/
|
|
@@ -9,4 +9,4 @@ import { SimplePromptbookLibrary } from '../SimplePromptbookLibrary';
|
|
|
9
9
|
* @param promptbookSources
|
|
10
10
|
* @returns PromptbookLibrary
|
|
11
11
|
*/
|
|
12
|
-
export declare function createLibraryFromJson(...promptbooks: Array<PromptbookJson>):
|
|
12
|
+
export declare function createLibraryFromJson(...promptbooks: Array<PromptbookJson>): SimplePromptbookLibrary;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/types",
|
|
3
|
-
"version": "0.59.0-
|
|
3
|
+
"version": "0.59.0-26",
|
|
4
4
|
"description": "Library to supercharge your use of large language models",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
}
|
|
46
46
|
],
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@promptbook/core": "0.59.0-
|
|
48
|
+
"@promptbook/core": "0.59.0-26"
|
|
49
49
|
},
|
|
50
50
|
"main": "./umd/index.umd.js",
|
|
51
51
|
"module": "./esm/index.es.js",
|
package/umd/index.umd.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { prettifyPromptbookString } from '../conversion/prettify/prettifyPromptbookString';
|
|
2
2
|
import { promptbookJsonToString } from '../conversion/promptbookJsonToString';
|
|
3
3
|
import { promptbookStringToJson } from '../conversion/promptbookStringToJson';
|
|
4
|
-
import {
|
|
4
|
+
import { validatePromptbook } from '../conversion/validation/validatePromptbook';
|
|
5
5
|
import { ExpectError } from '../errors/_ExpectError';
|
|
6
6
|
import { PromptbookExecutionError } from '../errors/PromptbookExecutionError';
|
|
7
7
|
import { PromptbookLibraryError } from '../errors/PromptbookLibraryError';
|
|
@@ -36,7 +36,7 @@ export { ExecutionTypes };
|
|
|
36
36
|
export { addUsage, assertsExecutionSuccessful, checkExpectations, executionReportJsonToString, ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults, isPassingExpectations, prepareKnowledgeFromMarkdown, prettifyPromptbookString, usageToWorktime, };
|
|
37
37
|
export { createLibraryFromJson, createLibraryFromPromise, createLibraryFromUrl, createSublibrary, libraryToJson };
|
|
38
38
|
export { SimplePromptInterfaceTools };
|
|
39
|
-
export { promptbookJsonToString, promptbookStringToJson,
|
|
39
|
+
export { promptbookJsonToString, promptbookStringToJson, validatePromptbook };
|
|
40
40
|
export { createPromptbookExecutor, MultipleLlmExecutionTools };
|
|
41
41
|
export { CallbackInterfaceTools, CallbackInterfaceToolsOptions };
|
|
42
42
|
export { ExpectError, PromptbookExecutionError, PromptbookLibraryError, PromptbookLogicError, PromptbookNotFoundError, PromptbookReferenceError, PromptbookSyntaxError, TemplateError, UnexpectedError, };
|
|
@@ -6,3 +6,7 @@ export declare const LOOP_LIMIT = 1000;
|
|
|
6
6
|
* The maximum number of iterations for a loops which adds characters one by one
|
|
7
7
|
*/
|
|
8
8
|
export declare const CHARACTER_LOOP_LIMIT = 100000;
|
|
9
|
+
/**
|
|
10
|
+
* The name of the builded promptbook library made by CLI `promptbook make` and for lookup in `createLibraryFromDirectory`
|
|
11
|
+
*/
|
|
12
|
+
export declare const PROMPTBOOK_MAKED_BASE_FILENAME = "promptbook-library";
|
|
@@ -13,7 +13,7 @@ import type { PromptbookJson } from '../../types/PromptbookJson/PromptbookJson';
|
|
|
13
13
|
* @returns the same promptbook if it is logically valid
|
|
14
14
|
* @throws {PromptbookLogicError} on logical error in the promptbook
|
|
15
15
|
*/
|
|
16
|
-
export declare function
|
|
16
|
+
export declare function validatePromptbook(promptbook: PromptbookJson): PromptbookJson;
|
|
17
17
|
/**
|
|
18
18
|
* TODO: [🧠] Work with promptbookVersion
|
|
19
19
|
* TODO: Use here some json-schema, Zod or something similar and change it to:
|
|
@@ -23,5 +23,5 @@ export declare function validatePromptbookJson(promptbook: PromptbookJson): Prom
|
|
|
23
23
|
* > * It checks:
|
|
24
24
|
* > * - it has a valid structure
|
|
25
25
|
* > * - ...
|
|
26
|
-
* > ex port function
|
|
26
|
+
* > ex port function validatePromptbook(promptbook: unknown): asserts promptbook is PromptbookJson {
|
|
27
27
|
*/
|
|
@@ -9,4 +9,4 @@ import { SimplePromptbookLibrary } from '../SimplePromptbookLibrary';
|
|
|
9
9
|
* @param promptbookSources
|
|
10
10
|
* @returns PromptbookLibrary
|
|
11
11
|
*/
|
|
12
|
-
export declare function createLibraryFromJson(...promptbooks: Array<PromptbookJson>):
|
|
12
|
+
export declare function createLibraryFromJson(...promptbooks: Array<PromptbookJson>): SimplePromptbookLibrary;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|