@promptbook/remote-client 0.61.0-28 → 0.61.0-29

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 CHANGED
@@ -214,7 +214,7 @@ var RemoteLlmExecutionTools = /** @class */ (function () {
214
214
  /**
215
215
  * The version of the Promptbook library
216
216
  */
217
- var PROMPTBOOK_VERSION = '0.61.0-27';
217
+ var PROMPTBOOK_VERSION = '0.61.0-28';
218
218
  // TODO: !!!! List here all the versions and annotate + put into script
219
219
 
220
220
  export { PROMPTBOOK_VERSION, RemoteLlmExecutionTools };
@@ -1,4 +1,5 @@
1
1
  import type { Promisable } from 'type-fest';
2
+ import type { PipelineJson } from '../types/PipelineJson/PipelineJson';
2
3
  import { PipelineExecutionError } from '../errors/PipelineExecutionError';
3
4
  import type { TaskProgress } from '../types/TaskProgress';
4
5
  import type { ExecutionReportJson } from '../types/execution-report/ExecutionReportJson';
@@ -10,6 +11,8 @@ import type { PromptResultUsage } from './PromptResultUsage';
10
11
  *
11
12
  * It can be created with `createPipelineExecutor` function.
12
13
  *
14
+ * @@@ almost-JSON (what about errors)
15
+ *
13
16
  * @see https://github.com/webgptorg/promptbook#executor
14
17
  */
15
18
  export type PipelineExecutor = {
@@ -17,8 +20,16 @@ export type PipelineExecutor = {
17
20
  };
18
21
  /**
19
22
  * @@@
23
+ *
24
+ * @@@ almost-JSON (what about errors)
20
25
  */
21
26
  export type PipelineExecutorResult = {
27
+ /**
28
+ * Result parameters of the execution
29
+ *
30
+ * Note: If the execution was not successful, there are only some of the result parameters
31
+ */
32
+ readonly outputParameters: Parameters;
22
33
  /**
23
34
  * Whether the execution was successful, details are aviable in `executionReport`
24
35
  */
@@ -40,13 +51,14 @@ export type PipelineExecutorResult = {
40
51
  */
41
52
  readonly executionReport: ExecutionReportJson;
42
53
  /**
43
- * Result parameters of the execution
54
+ * The prepared pipeline that was used for the execution
44
55
  *
45
- * Note: If the execution was not successful, there are only some of the result parameters
56
+ * Note: If you called `createPipelineExecutor` with fully prepared pipeline, this is the same object as this pipeline
57
+ * If you passed not fully prepared pipeline, this is same pipeline but fully prepared
46
58
  */
47
- readonly outputParameters: Parameters;
59
+ readonly preparedPipeline: PipelineJson;
48
60
  };
49
61
  /**
50
62
  * TODO: [🧠] Should this file be in /execution or /types folder?
51
- * TODO: [💷] `assertsExecutionSuccessful` should be the method of `PipelineExecutor` result
63
+ * TODO: [💷] `assertsExecutionSuccessful` should be the method of `PipelineExecutor` result - BUT maybe NOT?
52
64
  */
@@ -20,6 +20,16 @@ type CreatePipelineExecutorSettings = {
20
20
  * @default false
21
21
  */
22
22
  readonly isVerbose?: boolean;
23
+ /**
24
+ * If you pass fully prepared pipeline, this does not matter
25
+ *
26
+ * Otherwise:
27
+ * If false or not set, warning is shown when pipeline is not prepared
28
+ * If true, warning is suppressed
29
+ *
30
+ * @default false
31
+ */
32
+ readonly isNotPreparedWarningSupressed?: boolean;
23
33
  };
24
34
  /**
25
35
  * Options for `createPipelineExecutor`
@@ -47,8 +57,6 @@ interface CreatePipelineExecutorOptions {
47
57
  export declare function createPipelineExecutor(options: CreatePipelineExecutorOptions): PipelineExecutor;
48
58
  export {};
49
59
  /**
50
- * TODO: !!!!! return `preparedPipeline` from execution
51
- * TODO: !!!!! `isNotPreparedWarningSupressed`
52
60
  * TODO: Use isVerbose here (not only pass to `preparePipeline`)
53
61
  * TODO: [🪂] Use maxParallelCount here (not only pass to `preparePipeline`)
54
62
  * TODO: [♈] Probbably move expectations from templates to parameters
@@ -41,7 +41,7 @@ export type ExecutionReportJson = {
41
41
  /**
42
42
  * The prompt wich was executed
43
43
  */
44
- readonly prompt: Omit<Prompt, 'pipelineUrl' | 'parameters'>;
44
+ readonly prompt: Omit<Prompt, 'pipelineUrl'>;
45
45
  /**
46
46
  * Result of the prompt execution (if not failed during LLM execution)
47
47
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/remote-client",
3
- "version": "0.61.0-28",
3
+ "version": "0.61.0-29",
4
4
  "description": "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.61.0-28"
50
+ "@promptbook/core": "0.61.0-29"
51
51
  },
52
52
  "main": "./umd/index.umd.js",
53
53
  "module": "./esm/index.es.js",
package/umd/index.umd.js CHANGED
@@ -218,7 +218,7 @@
218
218
  /**
219
219
  * The version of the Promptbook library
220
220
  */
221
- var PROMPTBOOK_VERSION = '0.61.0-27';
221
+ var PROMPTBOOK_VERSION = '0.61.0-28';
222
222
  // TODO: !!!! List here all the versions and annotate + put into script
223
223
 
224
224
  exports.PROMPTBOOK_VERSION = PROMPTBOOK_VERSION;
@@ -1,4 +1,5 @@
1
1
  import type { Promisable } from 'type-fest';
2
+ import type { PipelineJson } from '../types/PipelineJson/PipelineJson';
2
3
  import { PipelineExecutionError } from '../errors/PipelineExecutionError';
3
4
  import type { TaskProgress } from '../types/TaskProgress';
4
5
  import type { ExecutionReportJson } from '../types/execution-report/ExecutionReportJson';
@@ -10,6 +11,8 @@ import type { PromptResultUsage } from './PromptResultUsage';
10
11
  *
11
12
  * It can be created with `createPipelineExecutor` function.
12
13
  *
14
+ * @@@ almost-JSON (what about errors)
15
+ *
13
16
  * @see https://github.com/webgptorg/promptbook#executor
14
17
  */
15
18
  export type PipelineExecutor = {
@@ -17,8 +20,16 @@ export type PipelineExecutor = {
17
20
  };
18
21
  /**
19
22
  * @@@
23
+ *
24
+ * @@@ almost-JSON (what about errors)
20
25
  */
21
26
  export type PipelineExecutorResult = {
27
+ /**
28
+ * Result parameters of the execution
29
+ *
30
+ * Note: If the execution was not successful, there are only some of the result parameters
31
+ */
32
+ readonly outputParameters: Parameters;
22
33
  /**
23
34
  * Whether the execution was successful, details are aviable in `executionReport`
24
35
  */
@@ -40,13 +51,14 @@ export type PipelineExecutorResult = {
40
51
  */
41
52
  readonly executionReport: ExecutionReportJson;
42
53
  /**
43
- * Result parameters of the execution
54
+ * The prepared pipeline that was used for the execution
44
55
  *
45
- * Note: If the execution was not successful, there are only some of the result parameters
56
+ * Note: If you called `createPipelineExecutor` with fully prepared pipeline, this is the same object as this pipeline
57
+ * If you passed not fully prepared pipeline, this is same pipeline but fully prepared
46
58
  */
47
- readonly outputParameters: Parameters;
59
+ readonly preparedPipeline: PipelineJson;
48
60
  };
49
61
  /**
50
62
  * TODO: [🧠] Should this file be in /execution or /types folder?
51
- * TODO: [💷] `assertsExecutionSuccessful` should be the method of `PipelineExecutor` result
63
+ * TODO: [💷] `assertsExecutionSuccessful` should be the method of `PipelineExecutor` result - BUT maybe NOT?
52
64
  */
@@ -20,6 +20,16 @@ type CreatePipelineExecutorSettings = {
20
20
  * @default false
21
21
  */
22
22
  readonly isVerbose?: boolean;
23
+ /**
24
+ * If you pass fully prepared pipeline, this does not matter
25
+ *
26
+ * Otherwise:
27
+ * If false or not set, warning is shown when pipeline is not prepared
28
+ * If true, warning is suppressed
29
+ *
30
+ * @default false
31
+ */
32
+ readonly isNotPreparedWarningSupressed?: boolean;
23
33
  };
24
34
  /**
25
35
  * Options for `createPipelineExecutor`
@@ -47,8 +57,6 @@ interface CreatePipelineExecutorOptions {
47
57
  export declare function createPipelineExecutor(options: CreatePipelineExecutorOptions): PipelineExecutor;
48
58
  export {};
49
59
  /**
50
- * TODO: !!!!! return `preparedPipeline` from execution
51
- * TODO: !!!!! `isNotPreparedWarningSupressed`
52
60
  * TODO: Use isVerbose here (not only pass to `preparePipeline`)
53
61
  * TODO: [🪂] Use maxParallelCount here (not only pass to `preparePipeline`)
54
62
  * TODO: [♈] Probbably move expectations from templates to parameters
@@ -41,7 +41,7 @@ export type ExecutionReportJson = {
41
41
  /**
42
42
  * The prompt wich was executed
43
43
  */
44
- readonly prompt: Omit<Prompt, 'pipelineUrl' | 'parameters'>;
44
+ readonly prompt: Omit<Prompt, 'pipelineUrl'>;
45
45
  /**
46
46
  * Result of the prompt execution (if not failed during LLM execution)
47
47
  */