@promptbook/node 0.100.0-24 → 0.100.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 +4 -2
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/utils.index.d.ts +2 -0
- package/esm/typings/src/book-components/BookEditor/BookEditor.d.ts +3 -1
- package/esm/typings/src/config.d.ts +6 -0
- package/esm/typings/src/execution/createPipelineExecutor/40-executeAttempts.d.ts +6 -1
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +4 -2
- package/umd/index.umd.js.map +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
|
|
2
2
|
import { VALUE_STRINGS } from '../config';
|
|
3
|
+
import { MAX_TOKENS } from '../config';
|
|
3
4
|
import { SMALL_NUMBER } from '../config';
|
|
4
5
|
import { renderPromptbookMermaid } from '../conversion/prettify/renderPipelineMermaidOptions';
|
|
5
6
|
import { deserializeError } from '../errors/utils/deserializeError';
|
|
@@ -85,6 +86,7 @@ import { isValidUrl } from '../utils/validators/url/isValidUrl';
|
|
|
85
86
|
import { isValidUuid } from '../utils/validators/uuid/isValidUuid';
|
|
86
87
|
export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
|
|
87
88
|
export { VALUE_STRINGS };
|
|
89
|
+
export { MAX_TOKENS };
|
|
88
90
|
export { SMALL_NUMBER };
|
|
89
91
|
export { renderPromptbookMermaid };
|
|
90
92
|
export { deserializeError };
|
|
@@ -6,7 +6,7 @@ export interface BookEditorProps {
|
|
|
6
6
|
className?: string;
|
|
7
7
|
/**
|
|
8
8
|
* CSS className for a font (e.g. from next/font) to style the editor text.
|
|
9
|
-
* If omitted, defaults to system fonts.
|
|
9
|
+
* If omitted, defaults to system serif fonts.
|
|
10
10
|
*/
|
|
11
11
|
fontClassName?: string;
|
|
12
12
|
/**
|
|
@@ -21,6 +21,8 @@ export interface BookEditorProps {
|
|
|
21
21
|
/**
|
|
22
22
|
* Renders a book editor
|
|
23
23
|
*
|
|
24
|
+
* 🔥 LIVE COMPONENT TEST: This component is being served live from the playground server!
|
|
25
|
+
*
|
|
24
26
|
* @public exported from `@promptbook/components`
|
|
25
27
|
*/
|
|
26
28
|
export declare function BookEditor(props: BookEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -129,6 +129,12 @@ export declare const VALUE_STRINGS: {
|
|
|
129
129
|
readonly unserializable: "(unserializable value)";
|
|
130
130
|
readonly circular: "(circular JSON)";
|
|
131
131
|
};
|
|
132
|
+
/**
|
|
133
|
+
* Default cap for the number of tokens in a single request to the LLM
|
|
134
|
+
*
|
|
135
|
+
* @public exported from `@promptbook/utils`
|
|
136
|
+
*/
|
|
137
|
+
export declare const MAX_TOKENS = 1048576;
|
|
132
138
|
/**
|
|
133
139
|
* Small number limit
|
|
134
140
|
*
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type { ReadonlyDeep, WritableDeep } from 'type-fest';
|
|
1
|
+
import type { PartialDeep, Promisable, ReadonlyDeep, WritableDeep } from 'type-fest';
|
|
2
2
|
import type { PipelineJson } from '../../pipeline/PipelineJson/PipelineJson';
|
|
3
3
|
import type { TaskJson } from '../../pipeline/PipelineJson/TaskJson';
|
|
4
4
|
import type { Parameters } from '../../types/typeAliases';
|
|
5
5
|
import type { string_parameter_name } from '../../types/typeAliases';
|
|
6
6
|
import type { TODO_string } from '../../utils/organization/TODO_string';
|
|
7
7
|
import type { ExecutionReportJson } from '../execution-report/ExecutionReportJson';
|
|
8
|
+
import type { PipelineExecutorResult } from '../PipelineExecutorResult';
|
|
8
9
|
import type { CreatePipelineExecutorOptions } from './00-CreatePipelineExecutorOptions';
|
|
9
10
|
/**
|
|
10
11
|
* Options for executing attempts of a pipeline task, including configuration for jokers, priority,
|
|
@@ -46,6 +47,10 @@ export type ExecuteAttemptsOptions = Required<Omit<CreatePipelineExecutorOptions
|
|
|
46
47
|
* The pipeline structure prepared for execution, as a deeply immutable PipelineJson object.
|
|
47
48
|
*/
|
|
48
49
|
readonly preparedPipeline: ReadonlyDeep<PipelineJson>;
|
|
50
|
+
/**
|
|
51
|
+
* Callback invoked with partial results as the execution progresses.
|
|
52
|
+
*/
|
|
53
|
+
onProgress(newOngoingResult: PartialDeep<PipelineExecutorResult>): Promisable<void>;
|
|
49
54
|
/**
|
|
50
55
|
* The execution report object, which is updated during execution.
|
|
51
56
|
*/
|
|
@@ -15,7 +15,7 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
|
|
|
15
15
|
export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
|
|
16
16
|
/**
|
|
17
17
|
* Represents the version string of the Promptbook engine.
|
|
18
|
-
* It follows semantic versioning (e.g., `0.100.0-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.100.0-25`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/node",
|
|
3
|
-
"version": "0.100.0-
|
|
3
|
+
"version": "0.100.0-26",
|
|
4
4
|
"description": "Promptbook: Run AI apps in plain human language across multiple models and platforms",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"module": "./esm/index.es.js",
|
|
94
94
|
"typings": "./esm/typings/src/_packages/node.index.d.ts",
|
|
95
95
|
"peerDependencies": {
|
|
96
|
-
"@promptbook/core": "0.100.0-
|
|
96
|
+
"@promptbook/core": "0.100.0-26"
|
|
97
97
|
},
|
|
98
98
|
"dependencies": {
|
|
99
99
|
"colors": "1.4.0",
|
package/umd/index.umd.js
CHANGED
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
* @generated
|
|
47
47
|
* @see https://github.com/webgptorg/promptbook
|
|
48
48
|
*/
|
|
49
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.100.0-
|
|
49
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.100.0-26';
|
|
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
|
|
@@ -3824,7 +3824,7 @@
|
|
|
3824
3824
|
*/
|
|
3825
3825
|
async function executeAttempts(options) {
|
|
3826
3826
|
const { jokerParameterNames, priority, maxAttempts, // <- Note: [💂]
|
|
3827
|
-
preparedContent, parameters, task, preparedPipeline, tools, $executionReport, pipelineIdentification, maxExecutionAttempts, } = options;
|
|
3827
|
+
preparedContent, parameters, task, preparedPipeline, tools, $executionReport, pipelineIdentification, maxExecutionAttempts, onProgress, } = options;
|
|
3828
3828
|
const $ongoingTaskResult = {
|
|
3829
3829
|
$result: null,
|
|
3830
3830
|
$resultString: null,
|
|
@@ -4068,6 +4068,8 @@
|
|
|
4068
4068
|
result: $ongoingTaskResult.$resultString,
|
|
4069
4069
|
error: error,
|
|
4070
4070
|
});
|
|
4071
|
+
// Note: Calling void function to signal progress (mutation of `$ongoingTaskResult`) - TODO: !!!! Is this working
|
|
4072
|
+
onProgress({});
|
|
4071
4073
|
}
|
|
4072
4074
|
finally {
|
|
4073
4075
|
if (!isJokerAttempt &&
|