@promptbook/remote-server 0.61.0-26 โ 0.61.0-28
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 +3 -3
- package/esm/typings/src/collection/constructors/createCollectionFromDirectory.d.ts +0 -1
- package/esm/typings/src/conversion/utils/stringifyPipelineJson.d.ts +1 -1
- package/esm/typings/src/conversion/validation/validatePipeline.d.ts +6 -6
- package/esm/typings/src/execution/PipelineExecutor.d.ts +1 -1
- package/esm/typings/src/execution/PromptResult.d.ts +15 -0
- package/esm/typings/src/execution/createPipelineExecutor.d.ts +3 -3
- package/esm/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/remote/startRemoteServer.d.ts +2 -2
- package/esm/typings/src/prepare/isPipelinePrepared.d.ts +3 -3
- package/esm/typings/src/prepare/preparePipeline.d.ts +1 -1
- package/esm/typings/src/prepare/prepareTemplates.d.ts +1 -1
- package/esm/typings/src/types/ModelRequirements.d.ts +1 -1
- package/esm/typings/src/utils/extractParameterNames.d.ts +0 -3
- package/package.json +2 -2
- package/umd/index.umd.js +3 -3
- package/umd/typings/src/collection/constructors/createCollectionFromDirectory.d.ts +0 -1
- package/umd/typings/src/conversion/utils/stringifyPipelineJson.d.ts +1 -1
- package/umd/typings/src/conversion/validation/validatePipeline.d.ts +6 -6
- package/umd/typings/src/execution/PipelineExecutor.d.ts +1 -1
- package/umd/typings/src/execution/PromptResult.d.ts +15 -0
- package/umd/typings/src/execution/createPipelineExecutor.d.ts +3 -3
- package/umd/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +1 -1
- package/umd/typings/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +1 -1
- package/umd/typings/src/llm-providers/remote/startRemoteServer.d.ts +2 -2
- package/umd/typings/src/prepare/isPipelinePrepared.d.ts +3 -3
- package/umd/typings/src/prepare/preparePipeline.d.ts +1 -1
- package/umd/typings/src/prepare/prepareTemplates.d.ts +1 -1
- package/umd/typings/src/types/ModelRequirements.d.ts +1 -1
- package/umd/typings/src/utils/extractParameterNames.d.ts +0 -3
package/esm/index.es.js
CHANGED
|
@@ -89,7 +89,7 @@ var PipelineExecutionError = /** @class */ (function (_super) {
|
|
|
89
89
|
/**
|
|
90
90
|
* The version of the Promptbook library
|
|
91
91
|
*/
|
|
92
|
-
var PROMPTBOOK_VERSION = '0.61.0-
|
|
92
|
+
var PROMPTBOOK_VERSION = '0.61.0-27';
|
|
93
93
|
// TODO: !!!! List here all the versions and annotate + put into script
|
|
94
94
|
|
|
95
95
|
/**
|
|
@@ -227,8 +227,8 @@ function startRemoteServer(options) {
|
|
|
227
227
|
/**
|
|
228
228
|
* TODO: [โ] Expose the collection to be able to connect to same collection via createCollectionFromUrl
|
|
229
229
|
* TODO: Handle progress - support streaming
|
|
230
|
-
* TODO: [
|
|
231
|
-
* TODO: [
|
|
230
|
+
* TODO: [๐ฏ] Do not hang up immediately but wait until client closes OR timeout
|
|
231
|
+
* TODO: [๐ฏ] Timeout on chat to free up resources
|
|
232
232
|
* TODO: [๐] Pass here some security token to prevent malitious usage and/or DDoS
|
|
233
233
|
* TODO: [0] Set unavailable models as undefined in `RemoteLlmExecutionTools` NOT throw error here
|
|
234
234
|
*/
|
|
@@ -43,6 +43,5 @@ type CreatePipelineCollectionFromDirectoryOptions = PipelineStringToJsonOptions
|
|
|
43
43
|
export declare function createCollectionFromDirectory(path: string_folder_path, options?: CreatePipelineCollectionFromDirectoryOptions): Promise<PipelineCollection>;
|
|
44
44
|
export {};
|
|
45
45
|
/**
|
|
46
|
-
* TODO: !!!! [๐ง ] Library precompilation and do not mix markdown and json pipelines
|
|
47
46
|
* Note: [๐ข] This code should never be published outside of `@pipeline/node`
|
|
48
47
|
*/
|
|
@@ -7,7 +7,7 @@ import type { string_json } from '../../types/typeAliases';
|
|
|
7
7
|
*/
|
|
8
8
|
export declare function stringifyPipelineJson<TType>(pipeline: TType): string_json<TType>;
|
|
9
9
|
/**
|
|
10
|
-
* TODO:
|
|
10
|
+
* TODO: [๐] Not Working propperly @see https://promptbook.studio/samples/mixed-knowledge.ptbk.md
|
|
11
11
|
* TODO: [๐ง ][0] Maybe rename to `stringifyPipelineJson`, `stringifyIndexedJson`,...
|
|
12
12
|
* TODO: [๐ง ] Maybe more elegant solution than replacing via regex
|
|
13
13
|
* TODO: [๐] Make some standart order of json properties
|
|
@@ -26,11 +26,11 @@ export declare function validatePipeline(pipeline: PipelineJson): PipelineJson;
|
|
|
26
26
|
* > ex port function validatePipeline(promptbook: really_unknown): asserts promptbook is PipelineJson {
|
|
27
27
|
*/
|
|
28
28
|
/**
|
|
29
|
-
* TODO: [
|
|
30
|
-
* TODO: [
|
|
31
|
-
* TODO: [
|
|
32
|
-
* TODO: !!!! Validate that parameter with reserved name not used RESERVED_PARAMETER_NAMES
|
|
33
|
-
* TODO: !!!! Validate that reserved parameter is not used as joker
|
|
34
|
-
* TODO: [๐ง ]
|
|
29
|
+
* TODO: [๐ฃ] !!!! Validate that all samples match expectations
|
|
30
|
+
* TODO: [๐ฃ][๐] !!!! Validate that knowledge is valid (non-void)
|
|
31
|
+
* TODO: [๐ฃ] !!!! Validate that persona can be used only with CHAT variant
|
|
32
|
+
* TODO: [๐ฃ] !!!! Validate that parameter with reserved name not used RESERVED_PARAMETER_NAMES
|
|
33
|
+
* TODO: [๐ฃ] !!!! Validate that reserved parameter is not used as joker
|
|
34
|
+
* TODO: [๐ง ] Validation not only logic itself but imports around - files and websites and rerefenced pipelines exists
|
|
35
35
|
* TODO: [๐ ] Actions, instruments (and maybe knowledge) => Functions and tools
|
|
36
36
|
*/
|
|
@@ -48,5 +48,5 @@ export type PipelineExecutorResult = {
|
|
|
48
48
|
};
|
|
49
49
|
/**
|
|
50
50
|
* TODO: [๐ง ] Should this file be in /execution or /types folder?
|
|
51
|
-
* TODO: [๐ท]
|
|
51
|
+
* TODO: [๐ท] `assertsExecutionSuccessful` should be the method of `PipelineExecutor` result
|
|
52
52
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { string_date_iso8601 } from '../types/typeAliases';
|
|
2
2
|
import type { string_model_name } from '../types/typeAliases';
|
|
3
|
+
import type { string_prompt } from '../types/typeAliases';
|
|
3
4
|
import type { TODO_object } from '../utils/organization/TODO_object';
|
|
4
5
|
import type { EmbeddingVector } from './EmbeddingVector';
|
|
5
6
|
import type { PromptResultUsage } from './PromptResultUsage';
|
|
@@ -69,8 +70,22 @@ export type CommonPromptResult = {
|
|
|
69
70
|
* Usage of the prompt execution
|
|
70
71
|
*/
|
|
71
72
|
readonly usage: PromptResultUsage;
|
|
73
|
+
/**
|
|
74
|
+
* Exact text of the prompt (with all replacements)
|
|
75
|
+
*
|
|
76
|
+
* Note: This contains redundant information
|
|
77
|
+
*/
|
|
78
|
+
readonly rawPromptContent: string_prompt;
|
|
79
|
+
/**
|
|
80
|
+
* Raw request to the model
|
|
81
|
+
*
|
|
82
|
+
* Note: This contains redundant information
|
|
83
|
+
*/
|
|
84
|
+
readonly rawRequest: TODO_object | null;
|
|
72
85
|
/**
|
|
73
86
|
* Raw response from the model
|
|
87
|
+
*
|
|
88
|
+
* Note: This contains redundant information
|
|
74
89
|
*/
|
|
75
90
|
readonly rawResponse: TODO_object;
|
|
76
91
|
};
|
|
@@ -47,8 +47,8 @@ interface CreatePipelineExecutorOptions {
|
|
|
47
47
|
export declare function createPipelineExecutor(options: CreatePipelineExecutorOptions): PipelineExecutor;
|
|
48
48
|
export {};
|
|
49
49
|
/**
|
|
50
|
-
* TODO:
|
|
51
|
-
* TODO:
|
|
50
|
+
* TODO: !!!!! return `preparedPipeline` from execution
|
|
51
|
+
* TODO: !!!!! `isNotPreparedWarningSupressed`
|
|
52
52
|
* TODO: Use isVerbose here (not only pass to `preparePipeline`)
|
|
53
53
|
* TODO: [๐ช] Use maxParallelCount here (not only pass to `preparePipeline`)
|
|
54
54
|
* TODO: [โ] Probbably move expectations from templates to parameters
|
|
@@ -57,5 +57,5 @@ export {};
|
|
|
57
57
|
* Note: CreatePipelineExecutorOptions are just connected to PipelineExecutor so do not extract to types folder
|
|
58
58
|
* TODO: [๐ง ][3] transparent = (report intermediate parameters) / opaque execution = (report only output parameters) progress reporting mode
|
|
59
59
|
* TODO: [๐ ] Actions, instruments (and maybe knowledge) => Functions and tools
|
|
60
|
-
* TODO: [๐ท]
|
|
60
|
+
* TODO: [๐ง ][๐ท] `assertsExecutionSuccessful` should be the method of `PipelineExecutor` result BUT maybe NOT to preserve pure JSON object
|
|
61
61
|
*/
|
|
@@ -41,7 +41,7 @@ export declare class AnthropicClaudeExecutionTools implements LlmExecutionTools
|
|
|
41
41
|
listModels(): Array<AvailableModel>;
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
|
-
* TODO:
|
|
44
|
+
* TODO: [๐] JSON mode
|
|
45
45
|
* TODO: [๐ง ] Maybe handle errors via transformAnthropicError (like transformAzureError)
|
|
46
46
|
* TODO: Maybe Create some common util for callChatModel and callCompletionModel
|
|
47
47
|
* TODO: Maybe make custom OpenaiError
|
|
@@ -50,5 +50,5 @@ export declare class RemoteLlmExecutionTools implements LlmExecutionTools {
|
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
52
|
* TODO: [๐] Allow to list compatible models with each variant
|
|
53
|
-
* TODO: [
|
|
53
|
+
* TODO: [๐ฏ] RemoteLlmExecutionTools should extend Destroyable and implement IDestroyable
|
|
54
54
|
*/
|
|
@@ -12,8 +12,8 @@ export declare function startRemoteServer(options: RemoteServerOptions): IDestro
|
|
|
12
12
|
/**
|
|
13
13
|
* TODO: [โ] Expose the collection to be able to connect to same collection via createCollectionFromUrl
|
|
14
14
|
* TODO: Handle progress - support streaming
|
|
15
|
-
* TODO: [
|
|
16
|
-
* TODO: [
|
|
15
|
+
* TODO: [๐ฏ] Do not hang up immediately but wait until client closes OR timeout
|
|
16
|
+
* TODO: [๐ฏ] Timeout on chat to free up resources
|
|
17
17
|
* TODO: [๐] Pass here some security token to prevent malitious usage and/or DDoS
|
|
18
18
|
* TODO: [0] Set unavailable models as undefined in `RemoteLlmExecutionTools` NOT throw error here
|
|
19
19
|
*/
|
|
@@ -8,7 +8,7 @@ export declare function isPipelinePrepared(pipeline: PipelineJson): boolean;
|
|
|
8
8
|
* TODO: [๐ผ] Export via core or utils
|
|
9
9
|
* TODO: [๐ง] Pipeline can be partially prepared, this should return true ONLY if fully prepared
|
|
10
10
|
* TODO: [๐งฟ] Maybe do same process with same granularity and subfinctions as `preparePipeline`
|
|
11
|
-
* - Is context in each template
|
|
12
|
-
* - Are samples prepared
|
|
13
|
-
* - Are templates prepared
|
|
11
|
+
* - [๐] ? Is context in each template
|
|
12
|
+
* - [โจ] Are samples prepared
|
|
13
|
+
* - [โจ] Are templates prepared
|
|
14
14
|
*/
|
|
@@ -12,6 +12,6 @@ export declare function preparePipeline(pipeline: PipelineJson, options: Prepare
|
|
|
12
12
|
* TODO: Write tests for `preparePipeline`
|
|
13
13
|
* TODO: [๐] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch
|
|
14
14
|
* TODO: [๐ง] In future one preparation can take data from previous preparation and save tokens and time
|
|
15
|
-
* TODO: [๐]
|
|
15
|
+
* TODO: [๐] !!!!! Use here countTotalUsage
|
|
16
16
|
* TODO: [๐ ] Actions, instruments (and maybe knowledge) => Functions and tools
|
|
17
17
|
*/
|
|
@@ -21,7 +21,7 @@ export {};
|
|
|
21
21
|
/**
|
|
22
22
|
* TODO: [๐ง ] Add context to each template (if missing)
|
|
23
23
|
* TODO: [๐ง ] What is better name `prepareTemplate` or `prepareTemplateAndParameters`
|
|
24
|
-
* TODO:
|
|
24
|
+
* TODO: [โจ] !!! Prepare index the samples and maybe templates
|
|
25
25
|
* TODO: [๐ผ] !!! Export via `@promptbook/core`
|
|
26
26
|
* TODO: Write tests for `preparePipeline`
|
|
27
27
|
* TODO: [๐] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch
|
|
@@ -91,7 +91,7 @@ export type CommonModelRequirements = {
|
|
|
91
91
|
readonly maxTokens?: number;
|
|
92
92
|
};
|
|
93
93
|
/**
|
|
94
|
-
* TODO: [๐ผ]
|
|
94
|
+
* TODO: [๐ผ] !!!!! (<- To all [๐ผ]) Export all from `@promptbook/types`
|
|
95
95
|
* TODO: [๐ง ][๐] `seed` should maybe be somewhere else (not in `ModelRequirements`) (simmilar that `user` identification is not here)
|
|
96
96
|
* TODO: [๐ง ][๐ฑ] Add more model options: `stop_token`, `logit_bias`, `logprobs` (`top_logprobs`), `top_k`, `top_p`, `presence_penalty`, `frequency_penalty`, `bestOf`, `logitBias`, `logitBiasType`,...
|
|
97
97
|
* [๐ฑ] Probbably keep using just `temperature` in Promptbook (not `top_k` and `top_p`)
|
|
@@ -7,6 +7,3 @@ import type { string_template } from '../types/typeAliases';
|
|
|
7
7
|
* @returns the list of parameter names
|
|
8
8
|
*/
|
|
9
9
|
export declare function extractParameterNames(template: string_template): Set<string_parameter_name>;
|
|
10
|
-
/**
|
|
11
|
-
* TODO: !!!!! Rename to extractParameterNames
|
|
12
|
-
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/remote-server",
|
|
3
|
-
"version": "0.61.0-
|
|
3
|
+
"version": "0.61.0-28",
|
|
4
4
|
"description": "Supercharge your use of large language models",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
}
|
|
50
50
|
],
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@promptbook/core": "0.61.0-
|
|
52
|
+
"@promptbook/core": "0.61.0-28"
|
|
53
53
|
},
|
|
54
54
|
"main": "./umd/index.umd.js",
|
|
55
55
|
"module": "./esm/index.es.js",
|
package/umd/index.umd.js
CHANGED
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
/**
|
|
96
96
|
* The version of the Promptbook library
|
|
97
97
|
*/
|
|
98
|
-
var PROMPTBOOK_VERSION = '0.61.0-
|
|
98
|
+
var PROMPTBOOK_VERSION = '0.61.0-27';
|
|
99
99
|
// TODO: !!!! List here all the versions and annotate + put into script
|
|
100
100
|
|
|
101
101
|
/**
|
|
@@ -233,8 +233,8 @@
|
|
|
233
233
|
/**
|
|
234
234
|
* TODO: [โ] Expose the collection to be able to connect to same collection via createCollectionFromUrl
|
|
235
235
|
* TODO: Handle progress - support streaming
|
|
236
|
-
* TODO: [
|
|
237
|
-
* TODO: [
|
|
236
|
+
* TODO: [๐ฏ] Do not hang up immediately but wait until client closes OR timeout
|
|
237
|
+
* TODO: [๐ฏ] Timeout on chat to free up resources
|
|
238
238
|
* TODO: [๐] Pass here some security token to prevent malitious usage and/or DDoS
|
|
239
239
|
* TODO: [0] Set unavailable models as undefined in `RemoteLlmExecutionTools` NOT throw error here
|
|
240
240
|
*/
|
|
@@ -43,6 +43,5 @@ type CreatePipelineCollectionFromDirectoryOptions = PipelineStringToJsonOptions
|
|
|
43
43
|
export declare function createCollectionFromDirectory(path: string_folder_path, options?: CreatePipelineCollectionFromDirectoryOptions): Promise<PipelineCollection>;
|
|
44
44
|
export {};
|
|
45
45
|
/**
|
|
46
|
-
* TODO: !!!! [๐ง ] Library precompilation and do not mix markdown and json pipelines
|
|
47
46
|
* Note: [๐ข] This code should never be published outside of `@pipeline/node`
|
|
48
47
|
*/
|
|
@@ -7,7 +7,7 @@ import type { string_json } from '../../types/typeAliases';
|
|
|
7
7
|
*/
|
|
8
8
|
export declare function stringifyPipelineJson<TType>(pipeline: TType): string_json<TType>;
|
|
9
9
|
/**
|
|
10
|
-
* TODO:
|
|
10
|
+
* TODO: [๐] Not Working propperly @see https://promptbook.studio/samples/mixed-knowledge.ptbk.md
|
|
11
11
|
* TODO: [๐ง ][0] Maybe rename to `stringifyPipelineJson`, `stringifyIndexedJson`,...
|
|
12
12
|
* TODO: [๐ง ] Maybe more elegant solution than replacing via regex
|
|
13
13
|
* TODO: [๐] Make some standart order of json properties
|
|
@@ -26,11 +26,11 @@ export declare function validatePipeline(pipeline: PipelineJson): PipelineJson;
|
|
|
26
26
|
* > ex port function validatePipeline(promptbook: really_unknown): asserts promptbook is PipelineJson {
|
|
27
27
|
*/
|
|
28
28
|
/**
|
|
29
|
-
* TODO: [
|
|
30
|
-
* TODO: [
|
|
31
|
-
* TODO: [
|
|
32
|
-
* TODO: !!!! Validate that parameter with reserved name not used RESERVED_PARAMETER_NAMES
|
|
33
|
-
* TODO: !!!! Validate that reserved parameter is not used as joker
|
|
34
|
-
* TODO: [๐ง ]
|
|
29
|
+
* TODO: [๐ฃ] !!!! Validate that all samples match expectations
|
|
30
|
+
* TODO: [๐ฃ][๐] !!!! Validate that knowledge is valid (non-void)
|
|
31
|
+
* TODO: [๐ฃ] !!!! Validate that persona can be used only with CHAT variant
|
|
32
|
+
* TODO: [๐ฃ] !!!! Validate that parameter with reserved name not used RESERVED_PARAMETER_NAMES
|
|
33
|
+
* TODO: [๐ฃ] !!!! Validate that reserved parameter is not used as joker
|
|
34
|
+
* TODO: [๐ง ] Validation not only logic itself but imports around - files and websites and rerefenced pipelines exists
|
|
35
35
|
* TODO: [๐ ] Actions, instruments (and maybe knowledge) => Functions and tools
|
|
36
36
|
*/
|
|
@@ -48,5 +48,5 @@ export type PipelineExecutorResult = {
|
|
|
48
48
|
};
|
|
49
49
|
/**
|
|
50
50
|
* TODO: [๐ง ] Should this file be in /execution or /types folder?
|
|
51
|
-
* TODO: [๐ท]
|
|
51
|
+
* TODO: [๐ท] `assertsExecutionSuccessful` should be the method of `PipelineExecutor` result
|
|
52
52
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { string_date_iso8601 } from '../types/typeAliases';
|
|
2
2
|
import type { string_model_name } from '../types/typeAliases';
|
|
3
|
+
import type { string_prompt } from '../types/typeAliases';
|
|
3
4
|
import type { TODO_object } from '../utils/organization/TODO_object';
|
|
4
5
|
import type { EmbeddingVector } from './EmbeddingVector';
|
|
5
6
|
import type { PromptResultUsage } from './PromptResultUsage';
|
|
@@ -69,8 +70,22 @@ export type CommonPromptResult = {
|
|
|
69
70
|
* Usage of the prompt execution
|
|
70
71
|
*/
|
|
71
72
|
readonly usage: PromptResultUsage;
|
|
73
|
+
/**
|
|
74
|
+
* Exact text of the prompt (with all replacements)
|
|
75
|
+
*
|
|
76
|
+
* Note: This contains redundant information
|
|
77
|
+
*/
|
|
78
|
+
readonly rawPromptContent: string_prompt;
|
|
79
|
+
/**
|
|
80
|
+
* Raw request to the model
|
|
81
|
+
*
|
|
82
|
+
* Note: This contains redundant information
|
|
83
|
+
*/
|
|
84
|
+
readonly rawRequest: TODO_object | null;
|
|
72
85
|
/**
|
|
73
86
|
* Raw response from the model
|
|
87
|
+
*
|
|
88
|
+
* Note: This contains redundant information
|
|
74
89
|
*/
|
|
75
90
|
readonly rawResponse: TODO_object;
|
|
76
91
|
};
|
|
@@ -47,8 +47,8 @@ interface CreatePipelineExecutorOptions {
|
|
|
47
47
|
export declare function createPipelineExecutor(options: CreatePipelineExecutorOptions): PipelineExecutor;
|
|
48
48
|
export {};
|
|
49
49
|
/**
|
|
50
|
-
* TODO:
|
|
51
|
-
* TODO:
|
|
50
|
+
* TODO: !!!!! return `preparedPipeline` from execution
|
|
51
|
+
* TODO: !!!!! `isNotPreparedWarningSupressed`
|
|
52
52
|
* TODO: Use isVerbose here (not only pass to `preparePipeline`)
|
|
53
53
|
* TODO: [๐ช] Use maxParallelCount here (not only pass to `preparePipeline`)
|
|
54
54
|
* TODO: [โ] Probbably move expectations from templates to parameters
|
|
@@ -57,5 +57,5 @@ export {};
|
|
|
57
57
|
* Note: CreatePipelineExecutorOptions are just connected to PipelineExecutor so do not extract to types folder
|
|
58
58
|
* TODO: [๐ง ][3] transparent = (report intermediate parameters) / opaque execution = (report only output parameters) progress reporting mode
|
|
59
59
|
* TODO: [๐ ] Actions, instruments (and maybe knowledge) => Functions and tools
|
|
60
|
-
* TODO: [๐ท]
|
|
60
|
+
* TODO: [๐ง ][๐ท] `assertsExecutionSuccessful` should be the method of `PipelineExecutor` result BUT maybe NOT to preserve pure JSON object
|
|
61
61
|
*/
|
|
@@ -41,7 +41,7 @@ export declare class AnthropicClaudeExecutionTools implements LlmExecutionTools
|
|
|
41
41
|
listModels(): Array<AvailableModel>;
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
|
-
* TODO:
|
|
44
|
+
* TODO: [๐] JSON mode
|
|
45
45
|
* TODO: [๐ง ] Maybe handle errors via transformAnthropicError (like transformAzureError)
|
|
46
46
|
* TODO: Maybe Create some common util for callChatModel and callCompletionModel
|
|
47
47
|
* TODO: Maybe make custom OpenaiError
|
|
@@ -50,5 +50,5 @@ export declare class RemoteLlmExecutionTools implements LlmExecutionTools {
|
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
52
|
* TODO: [๐] Allow to list compatible models with each variant
|
|
53
|
-
* TODO: [
|
|
53
|
+
* TODO: [๐ฏ] RemoteLlmExecutionTools should extend Destroyable and implement IDestroyable
|
|
54
54
|
*/
|
|
@@ -12,8 +12,8 @@ export declare function startRemoteServer(options: RemoteServerOptions): IDestro
|
|
|
12
12
|
/**
|
|
13
13
|
* TODO: [โ] Expose the collection to be able to connect to same collection via createCollectionFromUrl
|
|
14
14
|
* TODO: Handle progress - support streaming
|
|
15
|
-
* TODO: [
|
|
16
|
-
* TODO: [
|
|
15
|
+
* TODO: [๐ฏ] Do not hang up immediately but wait until client closes OR timeout
|
|
16
|
+
* TODO: [๐ฏ] Timeout on chat to free up resources
|
|
17
17
|
* TODO: [๐] Pass here some security token to prevent malitious usage and/or DDoS
|
|
18
18
|
* TODO: [0] Set unavailable models as undefined in `RemoteLlmExecutionTools` NOT throw error here
|
|
19
19
|
*/
|
|
@@ -8,7 +8,7 @@ export declare function isPipelinePrepared(pipeline: PipelineJson): boolean;
|
|
|
8
8
|
* TODO: [๐ผ] Export via core or utils
|
|
9
9
|
* TODO: [๐ง] Pipeline can be partially prepared, this should return true ONLY if fully prepared
|
|
10
10
|
* TODO: [๐งฟ] Maybe do same process with same granularity and subfinctions as `preparePipeline`
|
|
11
|
-
* - Is context in each template
|
|
12
|
-
* - Are samples prepared
|
|
13
|
-
* - Are templates prepared
|
|
11
|
+
* - [๐] ? Is context in each template
|
|
12
|
+
* - [โจ] Are samples prepared
|
|
13
|
+
* - [โจ] Are templates prepared
|
|
14
14
|
*/
|
|
@@ -12,6 +12,6 @@ export declare function preparePipeline(pipeline: PipelineJson, options: Prepare
|
|
|
12
12
|
* TODO: Write tests for `preparePipeline`
|
|
13
13
|
* TODO: [๐] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch
|
|
14
14
|
* TODO: [๐ง] In future one preparation can take data from previous preparation and save tokens and time
|
|
15
|
-
* TODO: [๐]
|
|
15
|
+
* TODO: [๐] !!!!! Use here countTotalUsage
|
|
16
16
|
* TODO: [๐ ] Actions, instruments (and maybe knowledge) => Functions and tools
|
|
17
17
|
*/
|
|
@@ -21,7 +21,7 @@ export {};
|
|
|
21
21
|
/**
|
|
22
22
|
* TODO: [๐ง ] Add context to each template (if missing)
|
|
23
23
|
* TODO: [๐ง ] What is better name `prepareTemplate` or `prepareTemplateAndParameters`
|
|
24
|
-
* TODO:
|
|
24
|
+
* TODO: [โจ] !!! Prepare index the samples and maybe templates
|
|
25
25
|
* TODO: [๐ผ] !!! Export via `@promptbook/core`
|
|
26
26
|
* TODO: Write tests for `preparePipeline`
|
|
27
27
|
* TODO: [๐] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch
|
|
@@ -91,7 +91,7 @@ export type CommonModelRequirements = {
|
|
|
91
91
|
readonly maxTokens?: number;
|
|
92
92
|
};
|
|
93
93
|
/**
|
|
94
|
-
* TODO: [๐ผ]
|
|
94
|
+
* TODO: [๐ผ] !!!!! (<- To all [๐ผ]) Export all from `@promptbook/types`
|
|
95
95
|
* TODO: [๐ง ][๐] `seed` should maybe be somewhere else (not in `ModelRequirements`) (simmilar that `user` identification is not here)
|
|
96
96
|
* TODO: [๐ง ][๐ฑ] Add more model options: `stop_token`, `logit_bias`, `logprobs` (`top_logprobs`), `top_k`, `top_p`, `presence_penalty`, `frequency_penalty`, `bestOf`, `logitBias`, `logitBiasType`,...
|
|
97
97
|
* [๐ฑ] Probbably keep using just `temperature` in Promptbook (not `top_k` and `top_p`)
|
|
@@ -7,6 +7,3 @@ import type { string_template } from '../types/typeAliases';
|
|
|
7
7
|
* @returns the list of parameter names
|
|
8
8
|
*/
|
|
9
9
|
export declare function extractParameterNames(template: string_template): Set<string_parameter_name>;
|
|
10
|
-
/**
|
|
11
|
-
* TODO: !!!!! Rename to extractParameterNames
|
|
12
|
-
*/
|