@promptbook/node 0.72.0-13 → 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.
@@ -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
  * @@@
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/node",
3
- "version": "0.72.0-13",
3
+ "version": "0.72.0-14",
4
4
  "description": "Supercharge your use of large language models",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -51,7 +51,7 @@
51
51
  "module": "./esm/index.es.js",
52
52
  "typings": "./esm/typings/src/_packages/node.index.d.ts",
53
53
  "peerDependencies": {
54
- "@promptbook/core": "0.72.0-13"
54
+ "@promptbook/core": "0.72.0-14"
55
55
  },
56
56
  "dependencies": {
57
57
  "colors": "1.4.0",
package/umd/index.umd.js CHANGED
@@ -35,7 +35,7 @@
35
35
  /**
36
36
  * The version of the Promptbook library
37
37
  */
38
- var PROMPTBOOK_VERSION = '0.72.0-12';
38
+ var PROMPTBOOK_VERSION = '0.72.0-13';
39
39
  // TODO: [main] !!!! List here all the versions and annotate + put into script
40
40
 
41
41
  /*! *****************************************************************************
@@ -8412,7 +8412,7 @@
8412
8412
  */
8413
8413
  function createLlmToolsFromConfiguration(configuration, options) {
8414
8414
  if (options === void 0) { options = {}; }
8415
- var _a = options.isVerbose, isVerbose = _a === void 0 ? IS_VERBOSE : _a;
8415
+ var _a = options.isVerbose, isVerbose = _a === void 0 ? IS_VERBOSE : _a, userId = options.userId;
8416
8416
  var llmTools = configuration.map(function (llmConfiguration) {
8417
8417
  var registeredItem = $llmToolsRegister
8418
8418
  .list()
@@ -8423,7 +8423,7 @@
8423
8423
  if (registeredItem === undefined) {
8424
8424
  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 "); }));
8425
8425
  }
8426
- return registeredItem(__assign({ isVerbose: isVerbose }, llmConfiguration.options));
8426
+ return registeredItem(__assign({ isVerbose: isVerbose, userId: userId }, llmConfiguration.options));
8427
8427
  });
8428
8428
  return joinLlmExecutionTools.apply(void 0, __spreadArray([], __read(llmTools), false));
8429
8429
  }