@promptbook/remote-server 0.69.0-4 → 0.69.0-6
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 +1 -1
- package/esm/typings/src/_packages/types.index.d.ts +2 -2
- package/esm/typings/src/execution/PipelineExecutorResult.d.ts +5 -3
- package/esm/typings/src/execution/createPipelineExecutor/{CreatePipelineExecutorOptions.d.ts → 00-CreatePipelineExecutorOptions.d.ts} +1 -1
- package/esm/typings/src/execution/createPipelineExecutor/{CreatePipelineExecutorSettings.d.ts → 00-CreatePipelineExecutorSettings.d.ts} +4 -4
- package/esm/typings/src/execution/createPipelineExecutor/00-createPipelineExecutor.d.ts +10 -0
- package/esm/typings/src/execution/createPipelineExecutor/10-executePipeline.d.ts +55 -0
- package/esm/typings/src/execution/createPipelineExecutor/20-executeTemplate.d.ts +62 -0
- package/esm/typings/src/execution/createPipelineExecutor/30-executeFormatCell.d.ts +30 -0
- package/esm/typings/src/execution/createPipelineExecutor/40-executeAttempt.d.ts +30 -0
- package/esm/typings/src/execution/createPipelineExecutor/filterJustOutputParameters.d.ts +28 -2
- package/esm/typings/src/execution/createPipelineExecutor/getContextForTemplate.d.ts +3 -1
- package/esm/typings/src/execution/createPipelineExecutor/getKnowledgeForTemplate.d.ts +20 -2
- package/esm/typings/src/execution/createPipelineExecutor/getReservedParametersForTemplate.d.ts +24 -2
- package/esm/typings/src/execution/createPipelineExecutor/getSamplesForTemplate.d.ts +3 -1
- package/package.json +2 -2
- package/umd/index.umd.js +1 -1
- package/esm/typings/src/execution/createPipelineExecutor/createPipelineExecutor.d.ts +0 -24
- package/esm/typings/src/execution/createPipelineExecutor/executeSingleTemplate.d.ts +0 -27
package/esm/index.es.js
CHANGED
|
@@ -7,7 +7,7 @@ import spaceTrim$1, { spaceTrim } from 'spacetrim';
|
|
|
7
7
|
/**
|
|
8
8
|
* The version of the Promptbook library
|
|
9
9
|
*/
|
|
10
|
-
var PROMPTBOOK_VERSION = '0.69.0-
|
|
10
|
+
var PROMPTBOOK_VERSION = '0.69.0-5';
|
|
11
11
|
// TODO: !!!! List here all the versions and annotate + put into script
|
|
12
12
|
|
|
13
13
|
/*! *****************************************************************************
|
|
@@ -38,7 +38,7 @@ import { PipelineLogicError } from '../errors/PipelineLogicError';
|
|
|
38
38
|
import { PipelineUrlError } from '../errors/PipelineUrlError';
|
|
39
39
|
import { UnexpectedError } from '../errors/UnexpectedError';
|
|
40
40
|
import { assertsExecutionSuccessful } from '../execution/assertsExecutionSuccessful';
|
|
41
|
-
import { createPipelineExecutor } from '../execution/createPipelineExecutor/createPipelineExecutor';
|
|
41
|
+
import { createPipelineExecutor } from '../execution/createPipelineExecutor/00-createPipelineExecutor';
|
|
42
42
|
import { embeddingVectorToString } from '../execution/embeddingVectorToString';
|
|
43
43
|
import { ZERO_USAGE } from '../execution/utils/addUsage';
|
|
44
44
|
import { addUsage } from '../execution/utils/addUsage';
|
|
@@ -16,8 +16,8 @@ import type { renderPipelineMermaidOptions } from '../conversion/prettify/render
|
|
|
16
16
|
import type { ErrorJson } from '../errors/utils/ErrorJson';
|
|
17
17
|
import type { AvailableModel } from '../execution/AvailableModel';
|
|
18
18
|
import type { CommonExecutionToolsOptions } from '../execution/CommonExecutionToolsOptions';
|
|
19
|
-
import type { CreatePipelineExecutorOptions } from '../execution/createPipelineExecutor/CreatePipelineExecutorOptions';
|
|
20
|
-
import type { CreatePipelineExecutorSettings } from '../execution/createPipelineExecutor/CreatePipelineExecutorSettings';
|
|
19
|
+
import type { CreatePipelineExecutorOptions } from '../execution/createPipelineExecutor/00-CreatePipelineExecutorOptions';
|
|
20
|
+
import type { CreatePipelineExecutorSettings } from '../execution/createPipelineExecutor/00-CreatePipelineExecutorSettings';
|
|
21
21
|
import type { EmbeddingVector } from '../execution/EmbeddingVector';
|
|
22
22
|
import type { ExecutionTools } from '../execution/ExecutionTools';
|
|
23
23
|
import type { LlmExecutionTools } from '../execution/LlmExecutionTools';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { ReadonlyDeep } from 'type-fest';
|
|
2
|
+
import type { ErrorJson } from '../errors/utils/ErrorJson';
|
|
1
3
|
import type { ExecutionReportJson } from '../types/execution-report/ExecutionReportJson';
|
|
2
|
-
import type { Parameters } from '../types/typeAliases';
|
|
3
4
|
import type { PipelineJson } from '../types/PipelineJson/PipelineJson';
|
|
4
|
-
import type {
|
|
5
|
+
import type { Parameters } from '../types/typeAliases';
|
|
5
6
|
import type { PromptResultUsage } from './PromptResultUsage';
|
|
6
7
|
/**
|
|
7
8
|
* @@@
|
|
@@ -41,9 +42,10 @@ export type PipelineExecutorResult = {
|
|
|
41
42
|
* Note: If you called `createPipelineExecutor` with fully prepared pipeline, this is the same object as this pipeline
|
|
42
43
|
* If you passed not fully prepared pipeline, this is same pipeline but fully prepared
|
|
43
44
|
*/
|
|
44
|
-
readonly preparedPipeline: PipelineJson
|
|
45
|
+
readonly preparedPipeline: ReadonlyDeep<PipelineJson>;
|
|
45
46
|
};
|
|
46
47
|
/**
|
|
48
|
+
* TODO: !!!!!! Maybe add ReadonlyDeep< to all
|
|
47
49
|
* TODO: [🧠] Should this file be in /execution or /types folder?
|
|
48
50
|
* TODO: [🧠] Maybe constrain `ErrorJson` -> `ErrorJson & { name: 'PipelineExecutionError' | 'Error' }`
|
|
49
51
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PipelineJson } from '../../types/PipelineJson/PipelineJson';
|
|
2
2
|
import type { ExecutionTools } from '../ExecutionTools';
|
|
3
|
-
import type { CreatePipelineExecutorSettings } from './CreatePipelineExecutorSettings';
|
|
3
|
+
import type { CreatePipelineExecutorSettings } from './00-CreatePipelineExecutorSettings';
|
|
4
4
|
/**
|
|
5
5
|
* Options for `createPipelineExecutor`
|
|
6
6
|
*/
|
|
@@ -4,19 +4,19 @@ export type CreatePipelineExecutorSettings = {
|
|
|
4
4
|
*
|
|
5
5
|
* @default MAX_EXECUTION_ATTEMPTS
|
|
6
6
|
*/
|
|
7
|
-
readonly maxExecutionAttempts
|
|
7
|
+
readonly maxExecutionAttempts: number;
|
|
8
8
|
/**
|
|
9
9
|
* Maximum number of tasks running in parallel
|
|
10
10
|
*
|
|
11
11
|
* @default MAX_PARALLEL_COUNT
|
|
12
12
|
*/
|
|
13
|
-
readonly maxParallelCount
|
|
13
|
+
readonly maxParallelCount: number;
|
|
14
14
|
/**
|
|
15
15
|
* If true, the preparation logs additional information
|
|
16
16
|
*
|
|
17
17
|
* @default false
|
|
18
18
|
*/
|
|
19
|
-
readonly isVerbose
|
|
19
|
+
readonly isVerbose: boolean;
|
|
20
20
|
/**
|
|
21
21
|
* If you pass fully prepared pipeline, this does not matter
|
|
22
22
|
*
|
|
@@ -26,5 +26,5 @@ export type CreatePipelineExecutorSettings = {
|
|
|
26
26
|
*
|
|
27
27
|
* @default false
|
|
28
28
|
*/
|
|
29
|
-
readonly isNotPreparedWarningSupressed
|
|
29
|
+
readonly isNotPreparedWarningSupressed: boolean;
|
|
30
30
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { PipelineExecutor } from '../PipelineExecutor';
|
|
2
|
+
import type { CreatePipelineExecutorOptions } from './00-CreatePipelineExecutorOptions';
|
|
3
|
+
/**
|
|
4
|
+
* Creates executor function from pipeline and execution tools.
|
|
5
|
+
*
|
|
6
|
+
* @returns The executor function
|
|
7
|
+
* @throws {PipelineLogicError} on logical error in the pipeline
|
|
8
|
+
* @public exported from `@promptbook/core`
|
|
9
|
+
*/
|
|
10
|
+
export declare function createPipelineExecutor(options: CreatePipelineExecutorOptions): PipelineExecutor;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { Promisable, ReadonlyDeep } from 'type-fest';
|
|
2
|
+
import type { CreatePipelineExecutorSettings } from './00-CreatePipelineExecutorSettings';
|
|
3
|
+
import type { PipelineJson } from '../../types/PipelineJson/PipelineJson';
|
|
4
|
+
import type { TaskProgress } from '../../types/TaskProgress';
|
|
5
|
+
import type { Parameters } from '../../types/typeAliases';
|
|
6
|
+
import type { ExecutionTools } from '../ExecutionTools';
|
|
7
|
+
import type { PipelineExecutorResult } from '../PipelineExecutorResult';
|
|
8
|
+
/**
|
|
9
|
+
* @@@
|
|
10
|
+
*
|
|
11
|
+
* @private internal type of `executePipelinex`
|
|
12
|
+
*/
|
|
13
|
+
type ExecutePipelineOptions = {
|
|
14
|
+
/**
|
|
15
|
+
* @@@
|
|
16
|
+
*/
|
|
17
|
+
readonly inputParameters: Readonly<Parameters>;
|
|
18
|
+
/**
|
|
19
|
+
* @@@
|
|
20
|
+
*/
|
|
21
|
+
readonly tools: ExecutionTools;
|
|
22
|
+
/**
|
|
23
|
+
* @@@
|
|
24
|
+
*/
|
|
25
|
+
readonly onProgress?: (taskProgress: TaskProgress) => Promisable<void>;
|
|
26
|
+
/**
|
|
27
|
+
* @@@
|
|
28
|
+
*/
|
|
29
|
+
readonly pipeline: PipelineJson;
|
|
30
|
+
/**
|
|
31
|
+
* @@@
|
|
32
|
+
*/
|
|
33
|
+
readonly preparedPipeline: ReadonlyDeep<PipelineJson>;
|
|
34
|
+
/**
|
|
35
|
+
* @@@
|
|
36
|
+
*/
|
|
37
|
+
readonly setPreparedPipeline: (preparedPipeline: ReadonlyDeep<PipelineJson>) => void;
|
|
38
|
+
/**
|
|
39
|
+
* @@@
|
|
40
|
+
*/
|
|
41
|
+
readonly pipelineIdentification: string;
|
|
42
|
+
/**
|
|
43
|
+
* Settings for the pipeline executor
|
|
44
|
+
*/
|
|
45
|
+
readonly settings: CreatePipelineExecutorSettings;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* @@@
|
|
49
|
+
*
|
|
50
|
+
* Note: This is not a `PipelineExecutor` (which is binded with one exact pipeline), but a utility function of `createPipelineExecutor` which creates `PipelineExecutor`
|
|
51
|
+
*
|
|
52
|
+
* @private internal utility of `createPipelineExecutor`
|
|
53
|
+
*/
|
|
54
|
+
export declare function executePipeline(options: ExecutePipelineOptions): Promise<PipelineExecutorResult>;
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Promisable, ReadonlyDeep } from 'type-fest';
|
|
2
|
+
import { MultipleLlmExecutionTools } from '../../llm-providers/multiple/MultipleLlmExecutionTools';
|
|
3
|
+
import type { ExecutionReportJson } from '../../types/execution-report/ExecutionReportJson';
|
|
4
|
+
import type { PipelineJson } from '../../types/PipelineJson/PipelineJson';
|
|
5
|
+
import type { TemplateJson } from '../../types/PipelineJson/TemplateJson';
|
|
6
|
+
import type { TaskProgress } from '../../types/TaskProgress';
|
|
7
|
+
import type { Parameters } from '../../types/typeAliases';
|
|
8
|
+
import type { ExecutionTools } from '../ExecutionTools';
|
|
9
|
+
import type { CreatePipelineExecutorSettings } from './00-CreatePipelineExecutorSettings';
|
|
10
|
+
/**
|
|
11
|
+
* @@@
|
|
12
|
+
*
|
|
13
|
+
* @private internal type of `executeTemplate`
|
|
14
|
+
*/
|
|
15
|
+
type executeSingleTemplateOptions = {
|
|
16
|
+
/**
|
|
17
|
+
* @@@
|
|
18
|
+
*/
|
|
19
|
+
readonly currentTemplate: ReadonlyDeep<TemplateJson>;
|
|
20
|
+
/**
|
|
21
|
+
* @@@
|
|
22
|
+
*/
|
|
23
|
+
readonly preparedPipeline: ReadonlyDeep<PipelineJson>;
|
|
24
|
+
/**
|
|
25
|
+
* @@@
|
|
26
|
+
*/
|
|
27
|
+
readonly parametersToPass: Readonly<Parameters>;
|
|
28
|
+
/**
|
|
29
|
+
* @@@
|
|
30
|
+
*/
|
|
31
|
+
readonly tools: Omit<ExecutionTools, 'llm'>;
|
|
32
|
+
/**
|
|
33
|
+
* @@@
|
|
34
|
+
*/
|
|
35
|
+
readonly llmTools: MultipleLlmExecutionTools;
|
|
36
|
+
/**
|
|
37
|
+
* @@@
|
|
38
|
+
*/
|
|
39
|
+
readonly onProgress: (taskProgress: TaskProgress) => Promisable<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Settings for the pipeline executor
|
|
42
|
+
*/
|
|
43
|
+
readonly settings: CreatePipelineExecutorSettings;
|
|
44
|
+
/**
|
|
45
|
+
* @@@
|
|
46
|
+
*/
|
|
47
|
+
readonly $executionReport: ExecutionReportJson;
|
|
48
|
+
/**
|
|
49
|
+
* @@@
|
|
50
|
+
*/
|
|
51
|
+
readonly pipelineIdentification: string;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* @@@
|
|
55
|
+
*
|
|
56
|
+
* @private internal utility of `createPipelineExecutor`
|
|
57
|
+
*/
|
|
58
|
+
export declare function executeTemplate(options: executeSingleTemplateOptions): Promise<Readonly<Parameters>>;
|
|
59
|
+
export {};
|
|
60
|
+
/**
|
|
61
|
+
* TODO: [🤹♂️]
|
|
62
|
+
*/
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ReadonlyDeep } from 'type-fest';
|
|
2
|
+
import type { PipelineJson } from '../../types/PipelineJson/PipelineJson';
|
|
3
|
+
import type { TemplateJson } from '../../types/PipelineJson/TemplateJson';
|
|
4
|
+
import type { TODO_any } from '../../utils/organization/TODO_any';
|
|
5
|
+
/**
|
|
6
|
+
* @@@
|
|
7
|
+
*
|
|
8
|
+
* @private internal type of `executeFormatCell`
|
|
9
|
+
*/
|
|
10
|
+
type ExecuteFormatCellOptions = {
|
|
11
|
+
/**
|
|
12
|
+
* @@@
|
|
13
|
+
*/
|
|
14
|
+
readonly preparedPipeline: ReadonlyDeep<PipelineJson>;
|
|
15
|
+
/**
|
|
16
|
+
* @@@
|
|
17
|
+
*/
|
|
18
|
+
readonly template: ReadonlyDeep<TemplateJson>;
|
|
19
|
+
/**
|
|
20
|
+
* @@@
|
|
21
|
+
*/
|
|
22
|
+
readonly pipelineIdentification: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* @@@
|
|
26
|
+
*
|
|
27
|
+
* @private internal utility of `createPipelineExecutor`
|
|
28
|
+
*/
|
|
29
|
+
export declare function executeFormatCell(options: ExecuteFormatCellOptions): Promise<TODO_any>;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ReadonlyDeep } from 'type-fest';
|
|
2
|
+
import type { PipelineJson } from '../../types/PipelineJson/PipelineJson';
|
|
3
|
+
import type { TemplateJson } from '../../types/PipelineJson/TemplateJson';
|
|
4
|
+
import type { TODO_any } from '../../utils/organization/TODO_any';
|
|
5
|
+
/**
|
|
6
|
+
* @@@
|
|
7
|
+
*
|
|
8
|
+
* @private internal type of `executeAttempt`
|
|
9
|
+
*/
|
|
10
|
+
type ExecuteAttemptOptions = {
|
|
11
|
+
/**
|
|
12
|
+
* @@@
|
|
13
|
+
*/
|
|
14
|
+
readonly preparedPipeline: ReadonlyDeep<PipelineJson>;
|
|
15
|
+
/**
|
|
16
|
+
* @@@
|
|
17
|
+
*/
|
|
18
|
+
readonly template: ReadonlyDeep<TemplateJson>;
|
|
19
|
+
/**
|
|
20
|
+
* @@@
|
|
21
|
+
*/
|
|
22
|
+
readonly pipelineIdentification: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* @@@
|
|
26
|
+
*
|
|
27
|
+
* @private internal utility of `createPipelineExecutor`
|
|
28
|
+
*/
|
|
29
|
+
export declare function executeAttempt(options: ExecuteAttemptOptions): Promise<TODO_any>;
|
|
30
|
+
export {};
|
|
@@ -3,6 +3,32 @@ import { PipelineExecutionError } from '../../errors/PipelineExecutionError';
|
|
|
3
3
|
import type { PipelineJson } from '../../types/PipelineJson/PipelineJson';
|
|
4
4
|
import type { Parameters } from '../../types/typeAliases';
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* @@@
|
|
7
|
+
*
|
|
8
|
+
* @private internal type of `createPipelineExecutor`
|
|
7
9
|
*/
|
|
8
|
-
|
|
10
|
+
type FilterJustOutputParametersOptions = {
|
|
11
|
+
/**
|
|
12
|
+
* @@@
|
|
13
|
+
*/
|
|
14
|
+
readonly preparedPipeline: ReadonlyDeep<PipelineJson>;
|
|
15
|
+
/**
|
|
16
|
+
* @@@
|
|
17
|
+
*/
|
|
18
|
+
readonly parametersToPass: Readonly<Parameters>;
|
|
19
|
+
/**
|
|
20
|
+
* @@@
|
|
21
|
+
*/
|
|
22
|
+
readonly $warnings: PipelineExecutionError[];
|
|
23
|
+
/**
|
|
24
|
+
* @@@
|
|
25
|
+
*/
|
|
26
|
+
readonly pipelineIdentification: string;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* @@@
|
|
30
|
+
*
|
|
31
|
+
* @private internal utility of `createPipelineExecutor`
|
|
32
|
+
*/
|
|
33
|
+
export declare function filterJustOutputParameters(options: FilterJustOutputParametersOptions): Parameters;
|
|
34
|
+
export {};
|
|
@@ -3,6 +3,8 @@ import type { TemplateJson } from '../../types/PipelineJson/TemplateJson';
|
|
|
3
3
|
import type { string_markdown } from '../../types/typeAliases';
|
|
4
4
|
import type { string_parameter_value } from '../../types/typeAliases';
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* @@@
|
|
7
|
+
*
|
|
8
|
+
* @private internal utility of `createPipelineExecutor`
|
|
7
9
|
*/
|
|
8
10
|
export declare function getContextForTemplate(template: ReadonlyDeep<TemplateJson>): Promise<string_parameter_value & string_markdown>;
|
|
@@ -4,6 +4,24 @@ import type { TemplateJson } from '../../types/PipelineJson/TemplateJson';
|
|
|
4
4
|
import type { string_markdown } from '../../types/typeAliases';
|
|
5
5
|
import type { string_parameter_value } from '../../types/typeAliases';
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* @@@
|
|
8
|
+
*
|
|
9
|
+
* @private internal type of `getKnowledgeForTemplate`
|
|
8
10
|
*/
|
|
9
|
-
|
|
11
|
+
type GetKnowledgeForTemplateOptions = {
|
|
12
|
+
/**
|
|
13
|
+
* @@@
|
|
14
|
+
*/
|
|
15
|
+
readonly preparedPipeline: ReadonlyDeep<PipelineJson>;
|
|
16
|
+
/**
|
|
17
|
+
* @@@
|
|
18
|
+
*/
|
|
19
|
+
readonly template: ReadonlyDeep<TemplateJson>;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* @@@
|
|
23
|
+
*
|
|
24
|
+
* @private internal utility of `createPipelineExecutor`
|
|
25
|
+
*/
|
|
26
|
+
export declare function getKnowledgeForTemplate(options: GetKnowledgeForTemplateOptions): Promise<string_parameter_value & string_markdown>;
|
|
27
|
+
export {};
|
package/esm/typings/src/execution/createPipelineExecutor/getReservedParametersForTemplate.d.ts
CHANGED
|
@@ -3,6 +3,28 @@ import type { PipelineJson } from '../../types/PipelineJson/PipelineJson';
|
|
|
3
3
|
import type { TemplateJson } from '../../types/PipelineJson/TemplateJson';
|
|
4
4
|
import type { ReservedParameters } from '../../types/typeAliases';
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* @@@
|
|
7
|
+
*
|
|
8
|
+
* @private internal type of `getReservedParametersForTemplate`
|
|
7
9
|
*/
|
|
8
|
-
|
|
10
|
+
type GetReservedParametersForTemplateOptions = {
|
|
11
|
+
/**
|
|
12
|
+
* @@@
|
|
13
|
+
*/
|
|
14
|
+
readonly preparedPipeline: ReadonlyDeep<PipelineJson>;
|
|
15
|
+
/**
|
|
16
|
+
* @@@
|
|
17
|
+
*/
|
|
18
|
+
readonly template: ReadonlyDeep<TemplateJson>;
|
|
19
|
+
/**
|
|
20
|
+
* @@@
|
|
21
|
+
*/
|
|
22
|
+
readonly pipelineIdentification: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* @@@
|
|
26
|
+
*
|
|
27
|
+
* @private internal utility of `createPipelineExecutor`
|
|
28
|
+
*/
|
|
29
|
+
export declare function getReservedParametersForTemplate(options: GetReservedParametersForTemplateOptions): Promise<Readonly<ReservedParameters>>;
|
|
30
|
+
export {};
|
|
@@ -3,6 +3,8 @@ import type { TemplateJson } from '../../types/PipelineJson/TemplateJson';
|
|
|
3
3
|
import type { string_markdown } from '../../types/typeAliases';
|
|
4
4
|
import type { string_parameter_value } from '../../types/typeAliases';
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* @@@
|
|
7
|
+
*
|
|
8
|
+
* @private internal utility of `createPipelineExecutor`
|
|
7
9
|
*/
|
|
8
10
|
export declare function getSamplesForTemplate(template: ReadonlyDeep<TemplateJson>): Promise<string_parameter_value & string_markdown>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/remote-server",
|
|
3
|
-
"version": "0.69.0-
|
|
3
|
+
"version": "0.69.0-6",
|
|
4
4
|
"description": "Supercharge your use of large language models",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"module": "./esm/index.es.js",
|
|
48
48
|
"typings": "./esm/typings/src/_packages/remote-server.index.d.ts",
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@promptbook/core": "0.69.0-
|
|
50
|
+
"@promptbook/core": "0.69.0-6"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"colors": "1.4.0",
|
package/umd/index.umd.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
/**
|
|
15
15
|
* The version of the Promptbook library
|
|
16
16
|
*/
|
|
17
|
-
var PROMPTBOOK_VERSION = '0.69.0-
|
|
17
|
+
var PROMPTBOOK_VERSION = '0.69.0-5';
|
|
18
18
|
// TODO: !!!! List here all the versions and annotate + put into script
|
|
19
19
|
|
|
20
20
|
/*! *****************************************************************************
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { PipelineExecutor } from '../PipelineExecutor';
|
|
2
|
-
import type { CreatePipelineExecutorOptions } from './CreatePipelineExecutorOptions';
|
|
3
|
-
/**
|
|
4
|
-
* Creates executor function from pipeline and execution tools.
|
|
5
|
-
*
|
|
6
|
-
* @returns The executor function
|
|
7
|
-
* @throws {PipelineLogicError} on logical error in the pipeline
|
|
8
|
-
* @public exported from `@promptbook/core`
|
|
9
|
-
*/
|
|
10
|
-
export declare function createPipelineExecutor(options: CreatePipelineExecutorOptions): PipelineExecutor;
|
|
11
|
-
/**
|
|
12
|
-
* TODO: [🤹♂️] Make some smarter system for limiting concurrent executions MAX_PARALLEL_TOTAL, MAX_PARALLEL_PER_LLM
|
|
13
|
-
* TODO: !!! Identify not only pipeline BUT exact template ${block(pipelineIdentification)}
|
|
14
|
-
* TODO: Use isVerbose here (not only pass to `preparePipeline`)
|
|
15
|
-
* TODO: [🧠][🌳] Use here `countTotalUsage` and put preparation and prepared pipiline to report
|
|
16
|
-
* TODO: [🪂] Use maxParallelCount here (not only pass to `preparePipeline`)
|
|
17
|
-
* TODO: [♈] Probbably move expectations from templates to parameters
|
|
18
|
-
* TODO: [🧠] When not meet expectations in DIALOG_TEMPLATE, make some way to tell the user
|
|
19
|
-
* TODO: [👧] Strongly type the executors to avoid need of remove nullables whtn noUncheckedIndexedAccess in tsconfig.json
|
|
20
|
-
* Note: CreatePipelineExecutorOptions are just connected to PipelineExecutor so do not extract to types folder
|
|
21
|
-
* TODO: [🧠][🍸] transparent = (report intermediate parameters) / opaque execution = (report only output parameters) progress reporting mode
|
|
22
|
-
* TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
|
|
23
|
-
* TODO: [🧠][💷] `assertsExecutionSuccessful` should be the method of `PipelineExecutor` result BUT maybe NOT to preserve pure JSON object
|
|
24
|
-
*/
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Promisable, ReadonlyDeep } from 'type-fest';
|
|
2
|
-
import type { ExecutionReportJson } from '../../types/execution-report/ExecutionReportJson';
|
|
3
|
-
import type { ExecutionTools } from '../ExecutionTools';
|
|
4
|
-
import { MultipleLlmExecutionTools } from '../../llm-providers/multiple/MultipleLlmExecutionTools';
|
|
5
|
-
import type { PipelineJson } from '../../types/PipelineJson/PipelineJson';
|
|
6
|
-
import type { TemplateJson } from '../../types/PipelineJson/TemplateJson';
|
|
7
|
-
import type { TaskProgress } from '../../types/TaskProgress';
|
|
8
|
-
import type { Parameters } from '../../types/typeAliases';
|
|
9
|
-
type executeSingleTemplateOptions = {
|
|
10
|
-
currentTemplate: ReadonlyDeep<TemplateJson>;
|
|
11
|
-
preparedPipeline: ReadonlyDeep<PipelineJson>;
|
|
12
|
-
parametersToPass: Readonly<Parameters>;
|
|
13
|
-
tools: Omit<ExecutionTools, 'llm'>;
|
|
14
|
-
llmTools: MultipleLlmExecutionTools;
|
|
15
|
-
onProgress: (taskProgress: TaskProgress) => Promisable<void>;
|
|
16
|
-
maxExecutionAttempts: number;
|
|
17
|
-
$executionReport: ExecutionReportJson;
|
|
18
|
-
pipelineIdentification: string;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* @private @@@
|
|
22
|
-
*/
|
|
23
|
-
export declare function executeSingleTemplate(options: executeSingleTemplateOptions): Promise<Readonly<Parameters>>;
|
|
24
|
-
export {};
|
|
25
|
-
/**
|
|
26
|
-
* TODO: [🤹♂️]
|
|
27
|
-
*/
|