Skip to content

Commit

Permalink
Introduce Titan Text Embedding V2 (#495)
Browse files Browse the repository at this point in the history
* Introduce Titan Text Embedding V2
  • Loading branch information
cagataycali committed Jun 17, 2024
1 parent 879aa53 commit 6b7f813
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 7 additions & 0 deletions apidocs/classes/bedrock.BedrockFoundationModel.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ can instantiate a `BedrockFoundationModel` object, e.g: `new BedrockFoundationMo
- [COHERE\_EMBED\_ENGLISH\_V3](bedrock.BedrockFoundationModel.md#cohere_embed_english_v3)
- [COHERE\_EMBED\_MULTILINGUAL\_V3](bedrock.BedrockFoundationModel.md#cohere_embed_multilingual_v3)
- [TITAN\_EMBED\_TEXT\_V1](bedrock.BedrockFoundationModel.md#titan_embed_text_v1)
- [TITAN\_EMBED\_TEXT\_V2\_1024](bedrock.BedrockFoundationModel.md#titan_embed_text_v2_1024)

### Methods

Expand Down Expand Up @@ -138,6 +139,12 @@ ___

`Static` `Readonly` **TITAN\_EMBED\_TEXT\_V1**: [`BedrockFoundationModel`](bedrock.BedrockFoundationModel.md)

___

### TITAN\_EMBED\_TEXT\_V2\_1024

`Static` `Readonly` **TITAN\_EMBED\_TEXT\_V2\_1024**: [`BedrockFoundationModel`](bedrock.BedrockFoundationModel.md)

## Methods

### asArn
Expand Down
7 changes: 5 additions & 2 deletions src/cdk-lib/bedrock/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,14 @@ export class BedrockFoundationModel {
'amazon.titan-text-premier-v1:0',
{ supportsAgents: true },
);

public static readonly TITAN_EMBED_TEXT_V1 = new BedrockFoundationModel(
'amazon.titan-embed-text-v1',
{ supportsKnowledgeBase: true, vectorDimensions: 1536 },
);
public static readonly TITAN_EMBED_TEXT_V2_1024 = new BedrockFoundationModel(
'amazon.titan-embed-text-v2:0',
{ supportsKnowledgeBase: true, vectorDimensions: 1024 },
);
public static readonly COHERE_EMBED_ENGLISH_V3 = new BedrockFoundationModel(
'cohere.embed-english-v3',
{ supportsKnowledgeBase: true, vectorDimensions: 1024 },
Expand Down Expand Up @@ -102,4 +105,4 @@ export class BedrockFoundationModel {
const region = cdk.Stack.of(construct).region;
return `arn:aws:bedrock:${region}::foundation-model/${this.modelId}`;
}
}
}

0 comments on commit 6b7f813

Please sign in to comment.