@promptbook/templates 0.100.0-25 → 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.
@@ -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 };
@@ -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-24`).
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/templates",
3
- "version": "0.100.0-25",
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,
@@ -95,7 +95,7 @@
95
95
  "module": "./esm/index.es.js",
96
96
  "typings": "./esm/typings/src/_packages/templates.index.d.ts",
97
97
  "peerDependencies": {
98
- "@promptbook/core": "0.100.0-25"
98
+ "@promptbook/core": "0.100.0-26"
99
99
  },
100
100
  "dependencies": {
101
101
  "prettier": "2.8.1",
package/umd/index.umd.js CHANGED
@@ -23,7 +23,7 @@
23
23
  * @generated
24
24
  * @see https://github.com/webgptorg/promptbook
25
25
  */
26
- const PROMPTBOOK_ENGINE_VERSION = '0.100.0-25';
26
+ const PROMPTBOOK_ENGINE_VERSION = '0.100.0-26';
27
27
  /**
28
28
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
29
29
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -1566,7 +1566,7 @@
1566
1566
  "preparations": [
1567
1567
  {
1568
1568
  "id": 1,
1569
- "promptbookVersion": "0.100.0-24",
1569
+ "promptbookVersion": "0.100.0-25",
1570
1570
  "usage": {
1571
1571
  "price": {
1572
1572
  "value": 0.026725000000000002
@@ -2119,7 +2119,7 @@
2119
2119
  "preparations": [
2120
2120
  {
2121
2121
  "id": 1,
2122
- "promptbookVersion": "0.100.0-24",
2122
+ "promptbookVersion": "0.100.0-25",
2123
2123
  "usage": {
2124
2124
  "price": {
2125
2125
  "value": 0.026725000000000002
@@ -2813,7 +2813,7 @@
2813
2813
  "preparations": [
2814
2814
  {
2815
2815
  "id": 1,
2816
- "promptbookVersion": "0.100.0-24",
2816
+ "promptbookVersion": "0.100.0-25",
2817
2817
  "usage": {
2818
2818
  "price": {
2819
2819
  "value": 0.0262975
@@ -2955,7 +2955,7 @@
2955
2955
  "preparations": [
2956
2956
  {
2957
2957
  "id": 1,
2958
- "promptbookVersion": "0.100.0-24",
2958
+ "promptbookVersion": "0.100.0-25",
2959
2959
  "usage": {
2960
2960
  "price": {
2961
2961
  "value": 0.0279975
@@ -3051,7 +3051,7 @@
3051
3051
  "preparations": [
3052
3052
  {
3053
3053
  "id": 1,
3054
- "promptbookVersion": "0.100.0-24",
3054
+ "promptbookVersion": "0.100.0-25",
3055
3055
  "usage": {
3056
3056
  "price": {
3057
3057
  "value": 0
@@ -3188,7 +3188,7 @@
3188
3188
  "preparations": [
3189
3189
  {
3190
3190
  "id": 1,
3191
- "promptbookVersion": "0.100.0-24",
3191
+ "promptbookVersion": "0.100.0-25",
3192
3192
  "usage": {
3193
3193
  "price": {
3194
3194
  "value": 0.027682500000000002
@@ -3338,7 +3338,7 @@
3338
3338
  "preparations": [
3339
3339
  {
3340
3340
  "id": 1,
3341
- "promptbookVersion": "0.100.0-24",
3341
+ "promptbookVersion": "0.100.0-25",
3342
3342
  "usage": {
3343
3343
  "price": {
3344
3344
  "value": 0.027307500000000002
@@ -3665,7 +3665,7 @@
3665
3665
  "preparations": [
3666
3666
  {
3667
3667
  "id": 1,
3668
- "promptbookVersion": "0.100.0-24",
3668
+ "promptbookVersion": "0.100.0-25",
3669
3669
  "usage": {
3670
3670
  "price": {
3671
3671
  "value": 0.02756
@@ -3800,7 +3800,7 @@
3800
3800
  "preparations": [
3801
3801
  {
3802
3802
  "id": 1,
3803
- "promptbookVersion": "0.100.0-24",
3803
+ "promptbookVersion": "0.100.0-25",
3804
3804
  "usage": {
3805
3805
  "price": {
3806
3806
  "value": 0.026932500000000005