@promptbook/cli 0.72.0-2 → 0.72.0-3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/cli",
3
- "version": "0.72.0-2",
3
+ "version": "0.72.0-3",
4
4
  "description": "Supercharge your use of large language models",
5
5
  "private": false,
6
6
  "sideEffects": false,
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-1';
42
+ var PROMPTBOOK_VERSION = '0.72.0-2';
43
43
  // TODO:[main] !!!! List here all the versions and annotate + put into script
44
44
 
45
45
  /*! *****************************************************************************
@@ -9544,13 +9544,14 @@
9544
9544
  };
9545
9545
  },
9546
9546
  createConfigurationFromEnv: function (env) {
9547
+ // Note: Note using `process.env` BUT `env` to pass in the environment variables dynamically
9547
9548
  if (typeof env.ANTHROPIC_CLAUDE_API_KEY === 'string') {
9548
9549
  return {
9549
9550
  title: 'Claude (from env)',
9550
9551
  packageName: '@promptbook/anthropic-claude',
9551
9552
  className: 'AnthropicClaudeExecutionTools',
9552
9553
  options: {
9553
- apiKey: process.env.ANTHROPIC_CLAUDE_API_KEY,
9554
+ apiKey: env.ANTHROPIC_CLAUDE_API_KEY,
9554
9555
  },
9555
9556
  };
9556
9557
  }
@@ -10245,6 +10246,7 @@
10245
10246
  };
10246
10247
  },
10247
10248
  createConfigurationFromEnv: function (env) {
10249
+ // Note: Note using `process.env` BUT `env` to pass in the environment variables dynamically
10248
10250
  if (typeof env.AZUREOPENAI_RESOURCE_NAME === 'string' &&
10249
10251
  typeof env.AZUREOPENAI_DEPLOYMENT_NAME === 'string' &&
10250
10252
  typeof env.AZUREOPENAI_API_KEY === 'string') {
@@ -10262,7 +10264,7 @@
10262
10264
  else if (typeof env.AZUREOPENAI_RESOURCE_NAME === 'string' ||
10263
10265
  typeof env.AZUREOPENAI_DEPLOYMENT_NAME === 'string' ||
10264
10266
  typeof env.AZUREOPENAI_API_KEY === 'string') {
10265
- throw new Error(spaceTrim__default["default"]("\n You must provide all of the following environment variables:\n \n - AZUREOPENAI_RESOURCE_NAME (".concat(typeof env.AZUREOPENAI_RESOURCE_NAME === 'string' ? 'defined' : 'not defined', ")\n - AZUREOPENAI_DEPLOYMENT_NAME (").concat(typeof env.AZUREOPENAI_DEPLOYMENT_NAME === 'string' ? 'defined' : 'not defined', ")\n - AZUREOPENAI_API_KEY (").concat(typeof env.AZUREOPENAI_API_KEY === 'string' ? 'defined' : 'not defined', ") \n ")));
10267
+ throw new Error(spaceTrim__default["default"]("\n You must provide all of the following environment variables:\n\n - AZUREOPENAI_RESOURCE_NAME (".concat(typeof env.AZUREOPENAI_RESOURCE_NAME === 'string' ? 'defined' : 'not defined', ")\n - AZUREOPENAI_DEPLOYMENT_NAME (").concat(typeof env.AZUREOPENAI_DEPLOYMENT_NAME === 'string' ? 'defined' : 'not defined', ")\n - AZUREOPENAI_API_KEY (").concat(typeof env.AZUREOPENAI_API_KEY === 'string' ? 'defined' : 'not defined', ")\n ")));
10266
10268
  }
10267
10269
  return null;
10268
10270
  },
@@ -11002,13 +11004,14 @@
11002
11004
  };
11003
11005
  },
11004
11006
  createConfigurationFromEnv: function (env) {
11007
+ // Note: Note using `process.env` BUT `env` to pass in the environment variables dynamically
11005
11008
  if (typeof env.OPENAI_API_KEY === 'string') {
11006
11009
  return {
11007
11010
  title: 'Open AI (from env)',
11008
11011
  packageName: '@promptbook/openai',
11009
11012
  className: 'OpenAiExecutionTools',
11010
11013
  options: {
11011
- apiKey: process.env.OPENAI_API_KEY,
11014
+ apiKey: env.OPENAI_API_KEY,
11012
11015
  },
11013
11016
  };
11014
11017
  }
@@ -11034,21 +11037,29 @@
11034
11037
  className: 'OpenAiAssistantExecutionTools',
11035
11038
  options: {
11036
11039
  apiKey: 'sk-',
11040
+ assistantId: 'asst_',
11037
11041
  },
11038
11042
  };
11039
11043
  },
11040
11044
  createConfigurationFromEnv: function (env) {
11041
- if (typeof env.OPENAI_API_KEY === 'string') {
11045
+ // TODO: Maybe auto-configure (multiple) assistants from env variables
11046
+ keepUnused(env);
11047
+ return null;
11048
+ /*
11049
+ if (typeof env.OPENAI_API_KEY === 'string' || typeof env.OPENAI_XXX === 'string') {
11042
11050
  return {
11043
11051
  title: 'Open AI Assistant (from env)',
11044
11052
  packageName: '@promptbook/openai',
11045
11053
  className: 'OpenAiAssistantExecutionTools',
11046
11054
  options: {
11047
- apiKey: process.env.OPENAI_API_KEY,
11055
+ apiKey: env.OPENAI_API_KEY!,
11056
+ assistantId: env.OPENAI_XXX!
11048
11057
  },
11049
11058
  };
11050
11059
  }
11060
+
11051
11061
  return null;
11062
+ */
11052
11063
  },
11053
11064
  });
11054
11065