@seekdb/amazon-bedrock 1.1.0 → 1.1.1

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/dist/index.cjs CHANGED
@@ -97,25 +97,28 @@ var AmazonBedrockEmbeddingFunction = class _AmazonBedrockEmbeddingFunction {
97
97
  }
98
98
  getConfig() {
99
99
  return {
100
- api_key: this.apiKey,
101
100
  region: this.region,
101
+ api_key_env: this.apiKeyEnv,
102
102
  model_name: this.modelName
103
103
  };
104
104
  }
105
105
  static buildFromConfig(config) {
106
- if (!config.api_key || !config.region) {
106
+ if (!config.api_key_env) {
107
107
  throw new Error(
108
- "api_key and region are required in config. Generate API key at: https://docs.aws.amazon.com/bedrock/latest/userguide/api-keys-generate.html"
108
+ "Building Amazon bedrock embedding function from config: api_key_env is required in config."
109
109
  );
110
110
  }
111
111
  return new _AmazonBedrockEmbeddingFunction({
112
- apiKey: config.api_key,
112
+ apiKeyEnv: config.api_key_env,
113
113
  region: config.region,
114
114
  modelName: config.model_name
115
115
  });
116
116
  }
117
117
  };
118
- (0, import_seekdb.registerEmbeddingFunction)(embeddingFunctionName, AmazonBedrockEmbeddingFunction);
118
+ (0, import_seekdb.registerEmbeddingFunction)(
119
+ embeddingFunctionName,
120
+ AmazonBedrockEmbeddingFunction
121
+ );
119
122
  // Annotate the CommonJS export names for ESM import in node:
120
123
  0 && (module.exports = {
121
124
  AmazonBedrockEmbeddingFunction
package/dist/index.mjs CHANGED
@@ -75,25 +75,28 @@ var AmazonBedrockEmbeddingFunction = class _AmazonBedrockEmbeddingFunction {
75
75
  }
76
76
  getConfig() {
77
77
  return {
78
- api_key: this.apiKey,
79
78
  region: this.region,
79
+ api_key_env: this.apiKeyEnv,
80
80
  model_name: this.modelName
81
81
  };
82
82
  }
83
83
  static buildFromConfig(config) {
84
- if (!config.api_key || !config.region) {
84
+ if (!config.api_key_env) {
85
85
  throw new Error(
86
- "api_key and region are required in config. Generate API key at: https://docs.aws.amazon.com/bedrock/latest/userguide/api-keys-generate.html"
86
+ "Building Amazon bedrock embedding function from config: api_key_env is required in config."
87
87
  );
88
88
  }
89
89
  return new _AmazonBedrockEmbeddingFunction({
90
- apiKey: config.api_key,
90
+ apiKeyEnv: config.api_key_env,
91
91
  region: config.region,
92
92
  modelName: config.model_name
93
93
  });
94
94
  }
95
95
  };
96
- registerEmbeddingFunction(embeddingFunctionName, AmazonBedrockEmbeddingFunction);
96
+ registerEmbeddingFunction(
97
+ embeddingFunctionName,
98
+ AmazonBedrockEmbeddingFunction
99
+ );
97
100
  export {
98
101
  AmazonBedrockEmbeddingFunction
99
102
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seekdb/amazon-bedrock",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
@@ -16,12 +16,12 @@
16
16
  "dist"
17
17
  ],
18
18
  "peerDependencies": {
19
- "seekdb": "1.1.0",
20
- "@seekdb/common": "1.1.0"
19
+ "@seekdb/common": "1.1.0",
20
+ "seekdb": "1.1.1"
21
21
  },
22
22
  "devDependencies": {
23
- "@seekdb/common": "1.1.0",
24
- "seekdb": "1.1.0"
23
+ "seekdb": "1.1.1",
24
+ "@seekdb/common": "1.1.0"
25
25
  },
26
26
  "dependencies": {
27
27
  "@aws-sdk/client-bedrock-runtime": "^3.713.0"