@ai-sdk/amazon-bedrock 4.0.40 → 4.0.41
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 +6 -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/package.json +3 -3
- package/src/bedrock-embedding-model.ts +1 -0
- package/src/bedrock-embedding-options.ts +9 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-sdk/amazon-bedrock",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.41",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"@smithy/util-utf8": "^4.0.0",
|
|
40
40
|
"aws4fetch": "^1.0.20",
|
|
41
41
|
"@ai-sdk/anthropic": "3.0.31",
|
|
42
|
-
"@ai-sdk/provider": "
|
|
43
|
-
"@ai-sdk/provider
|
|
42
|
+
"@ai-sdk/provider-utils": "4.0.11",
|
|
43
|
+
"@ai-sdk/provider": "3.0.6"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/node": "20.17.24",
|
|
@@ -95,6 +95,7 @@ export class BedrockEmbeddingModel implements EmbeddingModelV3 {
|
|
|
95
95
|
input_type: bedrockOptions.inputType ?? 'search_query',
|
|
96
96
|
texts: [values[0]],
|
|
97
97
|
truncate: bedrockOptions.truncate,
|
|
98
|
+
output_dimension: bedrockOptions.outputDimension,
|
|
98
99
|
}
|
|
99
100
|
: {
|
|
100
101
|
inputText: values[0],
|
|
@@ -17,7 +17,7 @@ export const bedrockEmbeddingProviderOptions = z.object({
|
|
|
17
17
|
.optional(),
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* Flag indicating whether or not to normalize the output embeddings. Defaults to true
|
|
20
|
+
* Flag indicating whether or not to normalize the output embeddings. Defaults to true.
|
|
21
21
|
* Only supported in amazon.titan-embed-text-v2:0.
|
|
22
22
|
*/
|
|
23
23
|
normalize: z.boolean().optional(),
|
|
@@ -63,4 +63,12 @@ export const bedrockEmbeddingProviderOptions = z.object({
|
|
|
63
63
|
* Supported in Cohere and Nova embedding models. Defaults to 'END' for Nova models.
|
|
64
64
|
*/
|
|
65
65
|
truncate: z.enum(['NONE', 'START', 'END']).optional(),
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* The number of dimensions the resulting output embeddings should have (defaults to 1536).
|
|
69
|
+
* Only supported in cohere.embed-v4:0 and newer Cohere embedding models.
|
|
70
|
+
*/
|
|
71
|
+
outputDimension: z
|
|
72
|
+
.union([z.literal(256), z.literal(512), z.literal(1024), z.literal(1536)])
|
|
73
|
+
.optional(),
|
|
66
74
|
});
|