@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/esm/index.es.js CHANGED
@@ -21,7 +21,7 @@ import OpenAI from 'openai';
21
21
  /**
22
22
  * The version of the Promptbook library
23
23
  */
24
- var PROMPTBOOK_VERSION = '0.72.0-1';
24
+ var PROMPTBOOK_VERSION = '0.72.0-2';
25
25
  // TODO:[main] !!!! List here all the versions and annotate + put into script
26
26
 
27
27
  /*! *****************************************************************************
@@ -9526,13 +9526,14 @@ var _AnthropicClaudeMetadataRegistration = $llmToolsMetadataRegister.register({
9526
9526
  };
9527
9527
  },
9528
9528
  createConfigurationFromEnv: function (env) {
9529
+ // Note: Note using `process.env` BUT `env` to pass in the environment variables dynamically
9529
9530
  if (typeof env.ANTHROPIC_CLAUDE_API_KEY === 'string') {
9530
9531
  return {
9531
9532
  title: 'Claude (from env)',
9532
9533
  packageName: '@promptbook/anthropic-claude',
9533
9534
  className: 'AnthropicClaudeExecutionTools',
9534
9535
  options: {
9535
- apiKey: process.env.ANTHROPIC_CLAUDE_API_KEY,
9536
+ apiKey: env.ANTHROPIC_CLAUDE_API_KEY,
9536
9537
  },
9537
9538
  };
9538
9539
  }
@@ -10227,6 +10228,7 @@ var _AzureOpenAiMetadataRegistration = $llmToolsMetadataRegister.register({
10227
10228
  };
10228
10229
  },
10229
10230
  createConfigurationFromEnv: function (env) {
10231
+ // Note: Note using `process.env` BUT `env` to pass in the environment variables dynamically
10230
10232
  if (typeof env.AZUREOPENAI_RESOURCE_NAME === 'string' &&
10231
10233
  typeof env.AZUREOPENAI_DEPLOYMENT_NAME === 'string' &&
10232
10234
  typeof env.AZUREOPENAI_API_KEY === 'string') {
@@ -10244,7 +10246,7 @@ var _AzureOpenAiMetadataRegistration = $llmToolsMetadataRegister.register({
10244
10246
  else if (typeof env.AZUREOPENAI_RESOURCE_NAME === 'string' ||
10245
10247
  typeof env.AZUREOPENAI_DEPLOYMENT_NAME === 'string' ||
10246
10248
  typeof env.AZUREOPENAI_API_KEY === 'string') {
10247
- throw new Error(spaceTrim$1("\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 ")));
10249
+ throw new Error(spaceTrim$1("\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 ")));
10248
10250
  }
10249
10251
  return null;
10250
10252
  },
@@ -10984,13 +10986,14 @@ var _OpenAiMetadataRegistration = $llmToolsMetadataRegister.register({
10984
10986
  };
10985
10987
  },
10986
10988
  createConfigurationFromEnv: function (env) {
10989
+ // Note: Note using `process.env` BUT `env` to pass in the environment variables dynamically
10987
10990
  if (typeof env.OPENAI_API_KEY === 'string') {
10988
10991
  return {
10989
10992
  title: 'Open AI (from env)',
10990
10993
  packageName: '@promptbook/openai',
10991
10994
  className: 'OpenAiExecutionTools',
10992
10995
  options: {
10993
- apiKey: process.env.OPENAI_API_KEY,
10996
+ apiKey: env.OPENAI_API_KEY,
10994
10997
  },
10995
10998
  };
10996
10999
  }
@@ -11016,21 +11019,29 @@ var _OpenAiAssistantMetadataRegistration = $llmToolsMetadataRegister.register({
11016
11019
  className: 'OpenAiAssistantExecutionTools',
11017
11020
  options: {
11018
11021
  apiKey: 'sk-',
11022
+ assistantId: 'asst_',
11019
11023
  },
11020
11024
  };
11021
11025
  },
11022
11026
  createConfigurationFromEnv: function (env) {
11023
- if (typeof env.OPENAI_API_KEY === 'string') {
11027
+ // TODO: Maybe auto-configure (multiple) assistants from env variables
11028
+ keepUnused(env);
11029
+ return null;
11030
+ /*
11031
+ if (typeof env.OPENAI_API_KEY === 'string' || typeof env.OPENAI_XXX === 'string') {
11024
11032
  return {
11025
11033
  title: 'Open AI Assistant (from env)',
11026
11034
  packageName: '@promptbook/openai',
11027
11035
  className: 'OpenAiAssistantExecutionTools',
11028
11036
  options: {
11029
- apiKey: process.env.OPENAI_API_KEY,
11037
+ apiKey: env.OPENAI_API_KEY!,
11038
+ assistantId: env.OPENAI_XXX!
11030
11039
  },
11031
11040
  };
11032
11041
  }
11042
+
11033
11043
  return null;
11044
+ */
11034
11045
  },
11035
11046
  });
11036
11047