@promptbook/cli 0.72.0-12 → 0.72.0-14
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/README.md +3 -3
- package/esm/index.es.js +3 -3
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/execution/LlmExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/_common/register/createLlmToolsFromConfiguration.d.ts +7 -0
- package/esm/typings/src/llm-providers/remote/interfaces/RemoteServerOptions.d.ts +2 -1
- package/package.json +1 -1
- package/umd/index.umd.js +3 -3
- package/umd/index.umd.js.map +1 -1
|
@@ -52,7 +52,7 @@ export type LlmExecutionTools = {
|
|
|
52
52
|
callEmbeddingModel?(prompt: Prompt): Promise<EmbeddingPromptResult>;
|
|
53
53
|
};
|
|
54
54
|
/**
|
|
55
|
-
* TODO: Implement destroyable pattern to free resources
|
|
55
|
+
* TODO: [🍚] Implement destroyable pattern to free resources
|
|
56
56
|
* TODO: [🏳] Add `callTranslationModel`
|
|
57
57
|
* TODO: [🧠] Emulation of one type of model with another one - emuate chat with completion; emulate translation with chat
|
|
58
58
|
* TODO: [🍓][♐] Some heuristic to pick the best model in listed models
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { string_user_id } from '../../../types/typeAliases';
|
|
1
2
|
import { MultipleLlmExecutionTools } from '../../multiple/MultipleLlmExecutionTools';
|
|
2
3
|
import type { LlmToolsConfiguration } from './LlmToolsConfiguration';
|
|
3
4
|
/**
|
|
@@ -12,6 +13,12 @@ export type CreateLlmToolsFromConfigurationOptions = {
|
|
|
12
13
|
* @default false
|
|
13
14
|
*/
|
|
14
15
|
isVerbose?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Identifier of the end user
|
|
18
|
+
*
|
|
19
|
+
* Note: This is passed to the LLM tools providers to identify misuse
|
|
20
|
+
*/
|
|
21
|
+
readonly userId?: string_user_id | null;
|
|
15
22
|
};
|
|
16
23
|
/**
|
|
17
24
|
* @@@
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Promisable } from 'type-fest';
|
|
1
2
|
import type { PipelineCollection } from '../../../collection/PipelineCollection';
|
|
2
3
|
import type { CommonToolsOptions } from '../../../execution/CommonToolsOptions';
|
|
3
4
|
import type { LlmExecutionTools } from '../../../execution/LlmExecutionTools';
|
|
@@ -51,7 +52,7 @@ export type CollectionRemoteServerOptions<TCustomOptions> = {
|
|
|
51
52
|
/**
|
|
52
53
|
* Creates llm execution tools for each client
|
|
53
54
|
*/
|
|
54
|
-
createLlmExecutionTools(options: CollectionRemoteServerClientOptions<TCustomOptions>): LlmExecutionTools
|
|
55
|
+
createLlmExecutionTools(options: CollectionRemoteServerClientOptions<TCustomOptions>): Promisable<LlmExecutionTools>;
|
|
55
56
|
};
|
|
56
57
|
export type CollectionRemoteServerClientOptions<TCustomOptions> = {
|
|
57
58
|
/**
|
package/package.json
CHANGED
package/umd/index.umd.js
CHANGED
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
/**
|
|
40
40
|
* The version of the Promptbook library
|
|
41
41
|
*/
|
|
42
|
-
var PROMPTBOOK_VERSION = '0.72.0-
|
|
42
|
+
var PROMPTBOOK_VERSION = '0.72.0-13';
|
|
43
43
|
// TODO: [main] !!!! List here all the versions and annotate + put into script
|
|
44
44
|
|
|
45
45
|
/*! *****************************************************************************
|
|
@@ -8643,7 +8643,7 @@
|
|
|
8643
8643
|
*/
|
|
8644
8644
|
function createLlmToolsFromConfiguration(configuration, options) {
|
|
8645
8645
|
if (options === void 0) { options = {}; }
|
|
8646
|
-
var _a = options.isVerbose, isVerbose = _a === void 0 ? IS_VERBOSE : _a;
|
|
8646
|
+
var _a = options.isVerbose, isVerbose = _a === void 0 ? IS_VERBOSE : _a, userId = options.userId;
|
|
8647
8647
|
var llmTools = configuration.map(function (llmConfiguration) {
|
|
8648
8648
|
var registeredItem = $llmToolsRegister
|
|
8649
8649
|
.list()
|
|
@@ -8654,7 +8654,7 @@
|
|
|
8654
8654
|
if (registeredItem === undefined) {
|
|
8655
8655
|
throw new Error(spaceTrim__default["default"](function (block) { return "\n There is no constructor for LLM provider `".concat(llmConfiguration.className, "` from `").concat(llmConfiguration.packageName, "`\n\n You have probably forgotten install and import the provider package.\n To fix this issue, you can:\n\n Install:\n\n > npm install ").concat(llmConfiguration.packageName, "\n\n And import:\n\n > import '").concat(llmConfiguration.packageName, "';\n\n\n ").concat(block($registeredLlmToolsMessage()), "\n "); }));
|
|
8656
8656
|
}
|
|
8657
|
-
return registeredItem(__assign({ isVerbose: isVerbose }, llmConfiguration.options));
|
|
8657
|
+
return registeredItem(__assign({ isVerbose: isVerbose, userId: userId }, llmConfiguration.options));
|
|
8658
8658
|
});
|
|
8659
8659
|
return joinLlmExecutionTools.apply(void 0, __spreadArray([], __read(llmTools), false));
|
|
8660
8660
|
}
|