Skip to content

Commit c2f93e1

Browse files
author
awstools
committedMay 30, 2024
feat(client-bedrock-agent): With this release, Knowledge bases for Bedrock adds support for Titan Text Embedding v2.
1 parent b46048a commit c2f93e1

File tree

6 files changed

+108
-0
lines changed

6 files changed

+108
-0
lines changed
 

‎clients/client-bedrock-agent/src/commands/CreateKnowledgeBaseCommand.ts

+10
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ export interface CreateKnowledgeBaseCommandOutput extends CreateKnowledgeBaseRes
7474
* type: "VECTOR", // required
7575
* vectorKnowledgeBaseConfiguration: { // VectorKnowledgeBaseConfiguration
7676
* embeddingModelArn: "STRING_VALUE", // required
77+
* embeddingModelConfiguration: { // EmbeddingModelConfiguration
78+
* bedrockEmbeddingModelConfiguration: { // BedrockEmbeddingModelConfiguration
79+
* dimensions: Number("int"),
80+
* },
81+
* },
7782
* },
7883
* },
7984
* storageConfiguration: { // StorageConfiguration
@@ -149,6 +154,11 @@ export interface CreateKnowledgeBaseCommandOutput extends CreateKnowledgeBaseRes
149154
* // type: "VECTOR", // required
150155
* // vectorKnowledgeBaseConfiguration: { // VectorKnowledgeBaseConfiguration
151156
* // embeddingModelArn: "STRING_VALUE", // required
157+
* // embeddingModelConfiguration: { // EmbeddingModelConfiguration
158+
* // bedrockEmbeddingModelConfiguration: { // BedrockEmbeddingModelConfiguration
159+
* // dimensions: Number("int"),
160+
* // },
161+
* // },
152162
* // },
153163
* // },
154164
* // storageConfiguration: { // StorageConfiguration

‎clients/client-bedrock-agent/src/commands/GetKnowledgeBaseCommand.ts

+5
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ export interface GetKnowledgeBaseCommandOutput extends GetKnowledgeBaseResponse,
5050
* // type: "VECTOR", // required
5151
* // vectorKnowledgeBaseConfiguration: { // VectorKnowledgeBaseConfiguration
5252
* // embeddingModelArn: "STRING_VALUE", // required
53+
* // embeddingModelConfiguration: { // EmbeddingModelConfiguration
54+
* // bedrockEmbeddingModelConfiguration: { // BedrockEmbeddingModelConfiguration
55+
* // dimensions: Number("int"),
56+
* // },
57+
* // },
5358
* // },
5459
* // },
5560
* // storageConfiguration: { // StorageConfiguration

‎clients/client-bedrock-agent/src/commands/UpdateKnowledgeBaseCommand.ts

+10
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ export interface UpdateKnowledgeBaseCommandOutput extends UpdateKnowledgeBaseRes
6262
* type: "VECTOR", // required
6363
* vectorKnowledgeBaseConfiguration: { // VectorKnowledgeBaseConfiguration
6464
* embeddingModelArn: "STRING_VALUE", // required
65+
* embeddingModelConfiguration: { // EmbeddingModelConfiguration
66+
* bedrockEmbeddingModelConfiguration: { // BedrockEmbeddingModelConfiguration
67+
* dimensions: Number("int"),
68+
* },
69+
* },
6570
* },
6671
* },
6772
* storageConfiguration: { // StorageConfiguration
@@ -134,6 +139,11 @@ export interface UpdateKnowledgeBaseCommandOutput extends UpdateKnowledgeBaseRes
134139
* // type: "VECTOR", // required
135140
* // vectorKnowledgeBaseConfiguration: { // VectorKnowledgeBaseConfiguration
136141
* // embeddingModelArn: "STRING_VALUE", // required
142+
* // embeddingModelConfiguration: { // EmbeddingModelConfiguration
143+
* // bedrockEmbeddingModelConfiguration: { // BedrockEmbeddingModelConfiguration
144+
* // dimensions: Number("int"),
145+
* // },
146+
* // },
137147
* // },
138148
* // },
139149
* // storageConfiguration: { // StorageConfiguration

‎clients/client-bedrock-agent/src/models/models_0.ts

+30
Original file line numberDiff line numberDiff line change
@@ -3275,6 +3275,30 @@ export const KnowledgeBaseType = {
32753275
*/
32763276
export type KnowledgeBaseType = (typeof KnowledgeBaseType)[keyof typeof KnowledgeBaseType];
32773277

3278+
/**
3279+
* <p>The vector configuration details for the Bedrock embeddings model.</p>
3280+
* @public
3281+
*/
3282+
export interface BedrockEmbeddingModelConfiguration {
3283+
/**
3284+
* <p>The dimensions details for the vector configuration used on the Bedrock embeddings model.</p>
3285+
* @public
3286+
*/
3287+
dimensions?: number;
3288+
}
3289+
3290+
/**
3291+
* <p>The configuration details for the embeddings model.</p>
3292+
* @public
3293+
*/
3294+
export interface EmbeddingModelConfiguration {
3295+
/**
3296+
* <p>The vector configuration details on the Bedrock embeddings model.</p>
3297+
* @public
3298+
*/
3299+
bedrockEmbeddingModelConfiguration?: BedrockEmbeddingModelConfiguration;
3300+
}
3301+
32783302
/**
32793303
* <p>Contains details about the model used to create vector embeddings for the knowledge base.</p>
32803304
* @public
@@ -3285,6 +3309,12 @@ export interface VectorKnowledgeBaseConfiguration {
32853309
* @public
32863310
*/
32873311
embeddingModelArn: string | undefined;
3312+
3313+
/**
3314+
* <p>The embeddings model configuration details for the vector model used in Knowledge Base.</p>
3315+
* @public
3316+
*/
3317+
embeddingModelConfiguration?: EmbeddingModelConfiguration;
32883318
}
32893319

32903320
/**

‎clients/client-bedrock-agent/src/protocols/Aws_restJson1.ts

+10
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,13 @@ import {
130130
AgentVersion,
131131
AgentVersionSummary,
132132
APISchema,
133+
BedrockEmbeddingModelConfiguration,
133134
ChunkingConfiguration,
134135
ConflictException,
135136
DataSource,
136137
DataSourceConfiguration,
137138
DataSourceSummary,
139+
EmbeddingModelConfiguration,
138140
FixedSizeChunkingConfiguration,
139141
Function,
140142
FunctionSchema,
@@ -2103,10 +2105,14 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont
21032105

21042106
// se_APISchema omitted.
21052107

2108+
// se_BedrockEmbeddingModelConfiguration omitted.
2109+
21062110
// se_ChunkingConfiguration omitted.
21072111

21082112
// se_DataSourceConfiguration omitted.
21092113

2114+
// se_EmbeddingModelConfiguration omitted.
2115+
21102116
// se_FixedSizeChunkingConfiguration omitted.
21112117

21122118
// se_Function omitted.
@@ -2486,6 +2492,8 @@ const de_AgentVersionSummary = (output: any, context: __SerdeContext): AgentVers
24862492

24872493
// de_APISchema omitted.
24882494

2495+
// de_BedrockEmbeddingModelConfiguration omitted.
2496+
24892497
// de_ChunkingConfiguration omitted.
24902498

24912499
/**
@@ -2536,6 +2544,8 @@ const de_DataSourceSummary = (output: any, context: __SerdeContext): DataSourceS
25362544
}) as any;
25372545
};
25382546

2547+
// de_EmbeddingModelConfiguration omitted.
2548+
25392549
// de_FailureReasons omitted.
25402550

25412551
// de_FixedSizeChunkingConfiguration omitted.

‎codegen/sdk-codegen/aws-models/bedrock-agent.json

+43
Original file line numberDiff line numberDiff line change
@@ -1962,6 +1962,20 @@
19621962
"smithy.api#pattern": "^(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:(([0-9]{12}:custom-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}/[a-z0-9]{12})|(:foundation-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))|([0-9]{12}:provisioned-model/[a-z0-9]{12})))|([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))|(([0-9a-zA-Z][_-]?)+)$"
19631963
}
19641964
},
1965+
"com.amazonaws.bedrockagent#BedrockEmbeddingModelConfiguration": {
1966+
"type": "structure",
1967+
"members": {
1968+
"dimensions": {
1969+
"target": "com.amazonaws.bedrockagent#Dimensions",
1970+
"traits": {
1971+
"smithy.api#documentation": "<p>The dimensions details for the vector configuration used on the Bedrock embeddings model.</p>"
1972+
}
1973+
}
1974+
},
1975+
"traits": {
1976+
"smithy.api#documentation": "<p>The vector configuration details for the Bedrock embeddings model.</p>"
1977+
}
1978+
},
19651979
"com.amazonaws.bedrockagent#BucketOwnerAccountId": {
19661980
"type": "string",
19671981
"traits": {
@@ -3441,6 +3455,15 @@
34413455
}
34423456
}
34433457
},
3458+
"com.amazonaws.bedrockagent#Dimensions": {
3459+
"type": "integer",
3460+
"traits": {
3461+
"smithy.api#range": {
3462+
"min": 0,
3463+
"max": 4096
3464+
}
3465+
}
3466+
},
34443467
"com.amazonaws.bedrockagent#DisassociateAgentKnowledgeBase": {
34453468
"type": "operation",
34463469
"input": {
@@ -3529,6 +3552,20 @@
35293552
"smithy.api#pattern": "^DRAFT$"
35303553
}
35313554
},
3555+
"com.amazonaws.bedrockagent#EmbeddingModelConfiguration": {
3556+
"type": "structure",
3557+
"members": {
3558+
"bedrockEmbeddingModelConfiguration": {
3559+
"target": "com.amazonaws.bedrockagent#BedrockEmbeddingModelConfiguration",
3560+
"traits": {
3561+
"smithy.api#documentation": "<p>The vector configuration details on the Bedrock embeddings model.</p>"
3562+
}
3563+
}
3564+
},
3565+
"traits": {
3566+
"smithy.api#documentation": "<p>The configuration details for the embeddings model.</p>"
3567+
}
3568+
},
35323569
"com.amazonaws.bedrockagent#FailureReason": {
35333570
"type": "string",
35343571
"traits": {
@@ -8012,6 +8049,12 @@
80128049
"smithy.api#documentation": "<p>The Amazon Resource Name (ARN) of the model used to create vector embeddings for the knowledge base.</p>",
80138050
"smithy.api#required": {}
80148051
}
8052+
},
8053+
"embeddingModelConfiguration": {
8054+
"target": "com.amazonaws.bedrockagent#EmbeddingModelConfiguration",
8055+
"traits": {
8056+
"smithy.api#documentation": "<p>The embeddings model configuration details for the vector model used in Knowledge Base.</p>"
8057+
}
80158058
}
80168059
},
80178060
"traits": {

0 commit comments

Comments
 (0)
Please sign in to comment.