@promptbook/remote-client 0.59.0-32 → 0.59.0-33
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 -1
- package/esm/typings/src/conversion/promptbookStringToJson.d.ts +4 -3
- package/esm/typings/src/conversion/promptbookStringToJsonSync.d.ts +23 -0
- package/esm/typings/src/conversion/promptbookStringToJsonSync.test.d.ts +1 -0
- package/package.json +2 -2
- package/umd/index.umd.js +1 -1
- package/umd/typings/src/_packages/core.index.d.ts +2 -1
- package/umd/typings/src/conversion/promptbookStringToJson.d.ts +4 -3
- package/umd/typings/src/conversion/promptbookStringToJsonSync.d.ts +23 -0
- package/umd/typings/src/conversion/promptbookStringToJsonSync.test.d.ts +1 -0
package/esm/index.es.js
CHANGED
|
@@ -156,7 +156,7 @@ var RemoteLlmExecutionTools = /** @class */ (function () {
|
|
|
156
156
|
/**
|
|
157
157
|
* The version of the Promptbook library
|
|
158
158
|
*/
|
|
159
|
-
var PROMPTBOOK_VERSION = '0.59.0-
|
|
159
|
+
var PROMPTBOOK_VERSION = '0.59.0-32';
|
|
160
160
|
|
|
161
161
|
export { PROMPTBOOK_VERSION, RemoteLlmExecutionTools };
|
|
162
162
|
//# sourceMappingURL=index.es.js.map
|
|
@@ -1,6 +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 { promptbookStringToJsonSync } from '../conversion/promptbookStringToJsonSync';
|
|
4
5
|
import { validatePromptbook } from '../conversion/validation/validatePromptbook';
|
|
5
6
|
import { ExpectError } from '../errors/_ExpectError';
|
|
6
7
|
import { PromptbookExecutionError } from '../errors/PromptbookExecutionError';
|
|
@@ -37,7 +38,7 @@ export { ExecutionTypes };
|
|
|
37
38
|
export { addUsage, assertsExecutionSuccessful, checkExpectations, embeddingVectorToString, executionReportJsonToString, ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults, isPassingExpectations, prepareKnowledgeFromMarkdown, prettifyPromptbookString, usageToWorktime, };
|
|
38
39
|
export { createLibraryFromJson, createLibraryFromPromise, createLibraryFromUrl, createSublibrary, libraryToJson };
|
|
39
40
|
export { SimplePromptInterfaceTools };
|
|
40
|
-
export { promptbookJsonToString, promptbookStringToJson, validatePromptbook };
|
|
41
|
+
export { promptbookJsonToString, promptbookStringToJson, promptbookStringToJsonSync, validatePromptbook };
|
|
41
42
|
export { createPromptbookExecutor, MultipleLlmExecutionTools };
|
|
42
43
|
export { CallbackInterfaceTools, CallbackInterfaceToolsOptions };
|
|
43
44
|
export { ExpectError, PromptbookExecutionError, PromptbookLibraryError, PromptbookLogicError, PromptbookNotFoundError, PromptbookReferenceError, PromptbookSyntaxError, TemplateError, UnexpectedError, };
|
|
@@ -13,6 +13,10 @@ type PromptbookStringToJsonOptions = {
|
|
|
13
13
|
/**
|
|
14
14
|
* Compile promptbook from string (markdown) format to JSON format
|
|
15
15
|
*
|
|
16
|
+
* Note: There are two similar functions:
|
|
17
|
+
* - `promptbookStringToJson` **(preferred)** - which propperly compiles the promptbook and use embedding for external knowledge
|
|
18
|
+
* - `promptbookStringToJsonSync` - use only if you need to compile promptbook synchronously and it contains NO external knowledge
|
|
19
|
+
*
|
|
16
20
|
* @param promptbookString {Promptbook} in string markdown format (.ptbk.md)
|
|
17
21
|
* @param options - Options and tools for the compilation
|
|
18
22
|
* @returns {Promptbook} compiled in JSON format (.ptbk.json)
|
|
@@ -24,8 +28,5 @@ type PromptbookStringToJsonOptions = {
|
|
|
24
28
|
export declare function promptbookStringToJson(promptbookString: PromptbookString, options?: PromptbookStringToJsonOptions): Promise<PromptbookJson>;
|
|
25
29
|
export {};
|
|
26
30
|
/**
|
|
27
|
-
* TODO: Report here line/column of error
|
|
28
|
-
* TODO: Use spaceTrim more effectively
|
|
29
|
-
* TODO: [🧠] Parameter flags - isInput, isOutput, isInternal
|
|
30
31
|
* TODO: [🏏] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch
|
|
31
32
|
*/
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
|
|
2
|
+
import type { PromptbookString } from '../types/PromptbookString';
|
|
3
|
+
/**
|
|
4
|
+
* Compile promptbook from string (markdown) format to JSON format synchronously
|
|
5
|
+
*
|
|
6
|
+
* Note: There are two similar functions:
|
|
7
|
+
* - `promptbookStringToJson` **(preferred)** - which propperly compiles the promptbook and use embedding for external knowledge
|
|
8
|
+
* - `promptbookStringToJsonSync` - use only if you need to compile promptbook synchronously and it contains NO external knowledge
|
|
9
|
+
*
|
|
10
|
+
* @param promptbookString {Promptbook} in string markdown format (.ptbk.md)
|
|
11
|
+
* @param options - Options and tools for the compilation
|
|
12
|
+
* @returns {Promptbook} compiled in JSON format (.ptbk.json)
|
|
13
|
+
* @throws {PromptbookSyntaxError} if the promptbook string is not valid
|
|
14
|
+
*
|
|
15
|
+
* Note: This function does not validate logic of the pipeline only the syntax
|
|
16
|
+
* Note: This function acts as compilation process
|
|
17
|
+
*/
|
|
18
|
+
export declare function promptbookStringToJsonSync(promptbookString: PromptbookString): PromptbookJson;
|
|
19
|
+
/**
|
|
20
|
+
* TODO: Report here line/column of error
|
|
21
|
+
* TODO: Use spaceTrim more effectively
|
|
22
|
+
* TODO: [🧠] Parameter flags - isInput, isOutput, isInternal
|
|
23
|
+
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/remote-client",
|
|
3
|
-
"version": "0.59.0-
|
|
3
|
+
"version": "0.59.0-33",
|
|
4
4
|
"description": "Library to supercharge your use of large language models",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
}
|
|
48
48
|
],
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@promptbook/core": "0.59.0-
|
|
50
|
+
"@promptbook/core": "0.59.0-33"
|
|
51
51
|
},
|
|
52
52
|
"main": "./umd/index.umd.js",
|
|
53
53
|
"module": "./esm/index.es.js",
|
package/umd/index.umd.js
CHANGED
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
/**
|
|
161
161
|
* The version of the Promptbook library
|
|
162
162
|
*/
|
|
163
|
-
var PROMPTBOOK_VERSION = '0.59.0-
|
|
163
|
+
var PROMPTBOOK_VERSION = '0.59.0-32';
|
|
164
164
|
|
|
165
165
|
exports.PROMPTBOOK_VERSION = PROMPTBOOK_VERSION;
|
|
166
166
|
exports.RemoteLlmExecutionTools = RemoteLlmExecutionTools;
|
|
@@ -1,6 +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 { promptbookStringToJsonSync } from '../conversion/promptbookStringToJsonSync';
|
|
4
5
|
import { validatePromptbook } from '../conversion/validation/validatePromptbook';
|
|
5
6
|
import { ExpectError } from '../errors/_ExpectError';
|
|
6
7
|
import { PromptbookExecutionError } from '../errors/PromptbookExecutionError';
|
|
@@ -37,7 +38,7 @@ export { ExecutionTypes };
|
|
|
37
38
|
export { addUsage, assertsExecutionSuccessful, checkExpectations, embeddingVectorToString, executionReportJsonToString, ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults, isPassingExpectations, prepareKnowledgeFromMarkdown, prettifyPromptbookString, usageToWorktime, };
|
|
38
39
|
export { createLibraryFromJson, createLibraryFromPromise, createLibraryFromUrl, createSublibrary, libraryToJson };
|
|
39
40
|
export { SimplePromptInterfaceTools };
|
|
40
|
-
export { promptbookJsonToString, promptbookStringToJson, validatePromptbook };
|
|
41
|
+
export { promptbookJsonToString, promptbookStringToJson, promptbookStringToJsonSync, validatePromptbook };
|
|
41
42
|
export { createPromptbookExecutor, MultipleLlmExecutionTools };
|
|
42
43
|
export { CallbackInterfaceTools, CallbackInterfaceToolsOptions };
|
|
43
44
|
export { ExpectError, PromptbookExecutionError, PromptbookLibraryError, PromptbookLogicError, PromptbookNotFoundError, PromptbookReferenceError, PromptbookSyntaxError, TemplateError, UnexpectedError, };
|
|
@@ -13,6 +13,10 @@ type PromptbookStringToJsonOptions = {
|
|
|
13
13
|
/**
|
|
14
14
|
* Compile promptbook from string (markdown) format to JSON format
|
|
15
15
|
*
|
|
16
|
+
* Note: There are two similar functions:
|
|
17
|
+
* - `promptbookStringToJson` **(preferred)** - which propperly compiles the promptbook and use embedding for external knowledge
|
|
18
|
+
* - `promptbookStringToJsonSync` - use only if you need to compile promptbook synchronously and it contains NO external knowledge
|
|
19
|
+
*
|
|
16
20
|
* @param promptbookString {Promptbook} in string markdown format (.ptbk.md)
|
|
17
21
|
* @param options - Options and tools for the compilation
|
|
18
22
|
* @returns {Promptbook} compiled in JSON format (.ptbk.json)
|
|
@@ -24,8 +28,5 @@ type PromptbookStringToJsonOptions = {
|
|
|
24
28
|
export declare function promptbookStringToJson(promptbookString: PromptbookString, options?: PromptbookStringToJsonOptions): Promise<PromptbookJson>;
|
|
25
29
|
export {};
|
|
26
30
|
/**
|
|
27
|
-
* TODO: Report here line/column of error
|
|
28
|
-
* TODO: Use spaceTrim more effectively
|
|
29
|
-
* TODO: [🧠] Parameter flags - isInput, isOutput, isInternal
|
|
30
31
|
* TODO: [🏏] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch
|
|
31
32
|
*/
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
|
|
2
|
+
import type { PromptbookString } from '../types/PromptbookString';
|
|
3
|
+
/**
|
|
4
|
+
* Compile promptbook from string (markdown) format to JSON format synchronously
|
|
5
|
+
*
|
|
6
|
+
* Note: There are two similar functions:
|
|
7
|
+
* - `promptbookStringToJson` **(preferred)** - which propperly compiles the promptbook and use embedding for external knowledge
|
|
8
|
+
* - `promptbookStringToJsonSync` - use only if you need to compile promptbook synchronously and it contains NO external knowledge
|
|
9
|
+
*
|
|
10
|
+
* @param promptbookString {Promptbook} in string markdown format (.ptbk.md)
|
|
11
|
+
* @param options - Options and tools for the compilation
|
|
12
|
+
* @returns {Promptbook} compiled in JSON format (.ptbk.json)
|
|
13
|
+
* @throws {PromptbookSyntaxError} if the promptbook string is not valid
|
|
14
|
+
*
|
|
15
|
+
* Note: This function does not validate logic of the pipeline only the syntax
|
|
16
|
+
* Note: This function acts as compilation process
|
|
17
|
+
*/
|
|
18
|
+
export declare function promptbookStringToJsonSync(promptbookString: PromptbookString): PromptbookJson;
|
|
19
|
+
/**
|
|
20
|
+
* TODO: Report here line/column of error
|
|
21
|
+
* TODO: Use spaceTrim more effectively
|
|
22
|
+
* TODO: [🧠] Parameter flags - isInput, isOutput, isInternal
|
|
23
|
+
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|