@promptbook/utils 0.61.0-27 โ 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 +1 -1
- package/esm/typings/src/execution/PromptResult.d.ts +15 -0
- 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/preparePipeline.d.ts +1 -1
- package/package.json +1 -1
- package/umd/index.umd.js +1 -1
- package/umd/typings/src/execution/PromptResult.d.ts +15 -0
- 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/preparePipeline.d.ts +1 -1
package/esm/index.es.js
CHANGED
|
@@ -1969,7 +1969,7 @@ function isValidUuid(value) {
|
|
|
1969
1969
|
/**
|
|
1970
1970
|
* The version of the Promptbook library
|
|
1971
1971
|
*/
|
|
1972
|
-
var PROMPTBOOK_VERSION = '0.61.0-
|
|
1972
|
+
var PROMPTBOOK_VERSION = '0.61.0-27';
|
|
1973
1973
|
// TODO: !!!! List here all the versions and annotate + put into script
|
|
1974
1974
|
|
|
1975
1975
|
// @promptbook/utils
|
|
@@ -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
|
};
|
|
@@ -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
|
*/
|
|
@@ -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
|
*/
|
package/package.json
CHANGED
package/umd/index.umd.js
CHANGED
|
@@ -1976,7 +1976,7 @@
|
|
|
1976
1976
|
/**
|
|
1977
1977
|
* The version of the Promptbook library
|
|
1978
1978
|
*/
|
|
1979
|
-
var PROMPTBOOK_VERSION = '0.61.0-
|
|
1979
|
+
var PROMPTBOOK_VERSION = '0.61.0-27';
|
|
1980
1980
|
// TODO: !!!! List here all the versions and annotate + put into script
|
|
1981
1981
|
|
|
1982
1982
|
// @promptbook/utils
|
|
@@ -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
|
};
|
|
@@ -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
|
*/
|
|
@@ -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
|
*/
|