@ai-sdk/amazon-bedrock 4.0.40 → 4.0.42
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/CHANGELOG.md +13 -0
- package/dist/anthropic/index.js +1 -1
- package/dist/anthropic/index.mjs +1 -1
- package/dist/index.js +10 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -4
- package/dist/index.mjs.map +1 -1
- package/docs/08-amazon-bedrock.mdx +5 -2
- package/package.json +2 -2
- package/src/bedrock-embedding-model.ts +1 -0
- package/src/bedrock-embedding-options.ts +9 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @ai-sdk/amazon-bedrock
|
|
2
2
|
|
|
3
|
+
## 4.0.42
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [c33343b]
|
|
8
|
+
- @ai-sdk/anthropic@3.0.32
|
|
9
|
+
|
|
10
|
+
## 4.0.41
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 0df64d6: Add `outputDimension` option for Cohere embedding models to control the size of the output embedding vector (256, 512, 1024, or 1536).
|
|
15
|
+
|
|
3
16
|
## 4.0.40
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/anthropic/index.js
CHANGED
|
@@ -35,7 +35,7 @@ var import_provider_utils = require("@ai-sdk/provider-utils");
|
|
|
35
35
|
var import_aws4fetch = require("aws4fetch");
|
|
36
36
|
|
|
37
37
|
// src/version.ts
|
|
38
|
-
var VERSION = true ? "4.0.
|
|
38
|
+
var VERSION = true ? "4.0.42" : "0.0.0-test";
|
|
39
39
|
|
|
40
40
|
// src/bedrock-sigv4-fetch.ts
|
|
41
41
|
function createSigV4FetchFunction(getCredentials, fetch = globalThis.fetch) {
|
package/dist/anthropic/index.mjs
CHANGED
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
import { AwsV4Signer } from "aws4fetch";
|
|
25
25
|
|
|
26
26
|
// src/version.ts
|
|
27
|
-
var VERSION = true ? "4.0.
|
|
27
|
+
var VERSION = true ? "4.0.42" : "0.0.0-test";
|
|
28
28
|
|
|
29
29
|
// src/bedrock-sigv4-fetch.ts
|
|
30
30
|
function createSigV4FetchFunction(getCredentials, fetch = globalThis.fetch) {
|
package/dist/index.js
CHANGED
|
@@ -1494,7 +1494,7 @@ var bedrockEmbeddingProviderOptions = import_v44.z.object({
|
|
|
1494
1494
|
*/
|
|
1495
1495
|
dimensions: import_v44.z.union([import_v44.z.literal(1024), import_v44.z.literal(512), import_v44.z.literal(256)]).optional(),
|
|
1496
1496
|
/**
|
|
1497
|
-
* Flag indicating whether or not to normalize the output embeddings. Defaults to true
|
|
1497
|
+
* Flag indicating whether or not to normalize the output embeddings. Defaults to true.
|
|
1498
1498
|
* Only supported in amazon.titan-embed-text-v2:0.
|
|
1499
1499
|
*/
|
|
1500
1500
|
normalize: import_v44.z.boolean().optional(),
|
|
@@ -1529,7 +1529,12 @@ var bedrockEmbeddingProviderOptions = import_v44.z.object({
|
|
|
1529
1529
|
* Truncation behavior when input exceeds the model's context length.
|
|
1530
1530
|
* Supported in Cohere and Nova embedding models. Defaults to 'END' for Nova models.
|
|
1531
1531
|
*/
|
|
1532
|
-
truncate: import_v44.z.enum(["NONE", "START", "END"]).optional()
|
|
1532
|
+
truncate: import_v44.z.enum(["NONE", "START", "END"]).optional(),
|
|
1533
|
+
/**
|
|
1534
|
+
* The number of dimensions the resulting output embeddings should have (defaults to 1536).
|
|
1535
|
+
* Only supported in cohere.embed-v4:0 and newer Cohere embedding models.
|
|
1536
|
+
*/
|
|
1537
|
+
outputDimension: import_v44.z.union([import_v44.z.literal(256), import_v44.z.literal(512), import_v44.z.literal(1024), import_v44.z.literal(1536)]).optional()
|
|
1533
1538
|
});
|
|
1534
1539
|
|
|
1535
1540
|
// src/bedrock-embedding-model.ts
|
|
@@ -1584,7 +1589,8 @@ var BedrockEmbeddingModel = class {
|
|
|
1584
1589
|
// Without it, the service attempts other schema branches and rejects the request.
|
|
1585
1590
|
input_type: (_e = bedrockOptions.inputType) != null ? _e : "search_query",
|
|
1586
1591
|
texts: [values[0]],
|
|
1587
|
-
truncate: bedrockOptions.truncate
|
|
1592
|
+
truncate: bedrockOptions.truncate,
|
|
1593
|
+
output_dimension: bedrockOptions.outputDimension
|
|
1588
1594
|
} : {
|
|
1589
1595
|
inputText: values[0],
|
|
1590
1596
|
dimensions: bedrockOptions.dimensions,
|
|
@@ -1868,7 +1874,7 @@ var import_provider_utils7 = require("@ai-sdk/provider-utils");
|
|
|
1868
1874
|
var import_aws4fetch = require("aws4fetch");
|
|
1869
1875
|
|
|
1870
1876
|
// src/version.ts
|
|
1871
|
-
var VERSION = true ? "4.0.
|
|
1877
|
+
var VERSION = true ? "4.0.42" : "0.0.0-test";
|
|
1872
1878
|
|
|
1873
1879
|
// src/bedrock-sigv4-fetch.ts
|
|
1874
1880
|
function createSigV4FetchFunction(getCredentials, fetch = globalThis.fetch) {
|