From 09b7070a30122fb565f289a0030899e366f6e89b Mon Sep 17 00:00:00 2001 From: maz Date: Wed, 26 Jun 2024 09:04:01 +0900 Subject: [PATCH 1/4] chore: add jamba-instruct model --- packages/aws-cdk-lib/aws-bedrock/lib/foundation-model.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/aws-cdk-lib/aws-bedrock/lib/foundation-model.ts b/packages/aws-cdk-lib/aws-bedrock/lib/foundation-model.ts index 8180802c30ca1..88ca74df7541b 100644 --- a/packages/aws-cdk-lib/aws-bedrock/lib/foundation-model.ts +++ b/packages/aws-cdk-lib/aws-bedrock/lib/foundation-model.ts @@ -71,6 +71,9 @@ export class FoundationModelIdentifier { /** Base model "ai21.j2-jumbo-instruct". */ public static readonly AI21_J2_JUMBO_INSTRUCT = new FoundationModelIdentifier('ai21.j2-jumbo-instruct'); + /** Base model "ai21.jamba-instruct-v1:0". */ + public static readonly AI21_J2_JAMBA_INSTRUCT = new FoundationModelIdentifier('ai21.jamba-instruct-v1:0'); + /** * Base model "anthropic.claude-v1". * @deprecated use latest version of the model From 30ed96f83aee6014e82733c054407c1576ac46d1 Mon Sep 17 00:00:00 2001 From: maz Date: Wed, 26 Jun 2024 20:32:26 +0900 Subject: [PATCH 2/4] add missing models --- .../aws-bedrock/lib/foundation-model.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/packages/aws-cdk-lib/aws-bedrock/lib/foundation-model.ts b/packages/aws-cdk-lib/aws-bedrock/lib/foundation-model.ts index 88ca74df7541b..f86bb022033a9 100644 --- a/packages/aws-cdk-lib/aws-bedrock/lib/foundation-model.ts +++ b/packages/aws-cdk-lib/aws-bedrock/lib/foundation-model.ts @@ -41,6 +41,9 @@ export class FoundationModelIdentifier { /** Base model "amazon.titan-embed-text-v2:0". */ public static readonly AMAZON_TITAN_EMBED_TEXT_V2_0 = new FoundationModelIdentifier('amazon.titan-embed-text-v2:0'); + /** Base model "amazon.titan-embed-text-v2:0:8k". */ + public static readonly AMAZON_TITAN_EMBED_TEXT_V2_0_8k = new FoundationModelIdentifier('amazon.titan-embed-text-v2:0:8k'); + /** Base model "amazon.titan-image-generator-v1". */ public static readonly AMAZON_TITAN_IMAGE_GENERATOR_G1_V1 = new FoundationModelIdentifier('amazon.titan-image-generator-v1'); @@ -65,6 +68,9 @@ export class FoundationModelIdentifier { /** Base model "ai21.j2-ultra-v1". */ public static readonly AI21_LABS_JURASSIC_2_ULTRA_V1 = new FoundationModelIdentifier('ai21.j2-ultra-v1'); + /** Base model "ai21.j2-ultra-v1:0:8k". */ + public static readonly AI21_LABS_JURASSIC_2_ULTRA_V1_0_8k = new FoundationModelIdentifier('ai21.j2-ultra-v1:0:8k'); + /** Base model "ai21.j2-grande-instruct". */ public static readonly AI21_J2_GRANDE_INSTRUCT = new FoundationModelIdentifier('ai21.j2-grande-instruct'); @@ -141,7 +147,7 @@ export class FoundationModelIdentifier { public static readonly COHERE_COMMAND_LIGHT_TEXT_V14_7_4K = new FoundationModelIdentifier('cohere.command-light-text-v14:7:4k'); /** Base model "cohere.command-r-v1:0". */ - public static readonly COHERE_COMMAND_R_V1 = new FoundationModelIdentifier('ccohere.command-r-v1:0'); + public static readonly COHERE_COMMAND_R_V1 = new FoundationModelIdentifier('cohere.command-r-v1:0'); /** Base model "cohere.command-r-v1:0". */ public static readonly COHERE_COMMAND_R_PLUS_V1 = new FoundationModelIdentifier('cohere.command-r-plus-v1:0'); @@ -149,9 +155,15 @@ export class FoundationModelIdentifier { /** Base model "cohere.embed-english-v3". */ public static readonly COHERE_EMBED_ENGLISH_V3 = new FoundationModelIdentifier('cohere.embed-english-v3'); + /** Base model "cohere.embed-english-v3:0:512". */ + public static readonly COHERE_EMBED_ENGLISH_V3_0_512 = new FoundationModelIdentifier('cohere.embed-english-v3:0:512'); + /** Base model "cohere.embed-multilingual-v3". */ public static readonly COHERE_EMBED_MULTILINGUAL_V3 = new FoundationModelIdentifier('cohere.embed-multilingual-v3'); + /** Base model "cohere.embed-multilingual-v3:0:512". */ + public static readonly COHERE_EMBED_MULTILINGUAL_V3_0_512 = new FoundationModelIdentifier('cohere.embed-multilingual-v3:0:512'); + /** Base model "meta.llama2-13b-v1". */ public static readonly META_LLAMA_2_13B_V1 = new FoundationModelIdentifier('meta.llama2-13b-v1'); @@ -191,6 +203,9 @@ export class FoundationModelIdentifier { /** Base model "mistral.mistral-large-2402-v1:0". */ public static readonly MISTRAL_LARGE_V0_1 = new FoundationModelIdentifier('mistral.mistral-large-2402-v1:0'); + /** Base model "mistral.mistral-small-2402-v1:0". */ + public static readonly MISTRAL_SMALL_V0_1 = new FoundationModelIdentifier('mistral.mistral-small-2402-v1:0'); + /** * Base model "stability.stable-diffusion-xl". * @deprecated use latest version of the model From 331657f3925e86e65255f78f9c2a539b54304ccf Mon Sep 17 00:00:00 2001 From: maz Date: Wed, 26 Jun 2024 20:56:34 +0900 Subject: [PATCH 3/4] fix model name --- packages/aws-cdk-lib/aws-bedrock/lib/foundation-model.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/aws-cdk-lib/aws-bedrock/lib/foundation-model.ts b/packages/aws-cdk-lib/aws-bedrock/lib/foundation-model.ts index f86bb022033a9..ba39e5f31fbe9 100644 --- a/packages/aws-cdk-lib/aws-bedrock/lib/foundation-model.ts +++ b/packages/aws-cdk-lib/aws-bedrock/lib/foundation-model.ts @@ -42,7 +42,7 @@ export class FoundationModelIdentifier { public static readonly AMAZON_TITAN_EMBED_TEXT_V2_0 = new FoundationModelIdentifier('amazon.titan-embed-text-v2:0'); /** Base model "amazon.titan-embed-text-v2:0:8k". */ - public static readonly AMAZON_TITAN_EMBED_TEXT_V2_0_8k = new FoundationModelIdentifier('amazon.titan-embed-text-v2:0:8k'); + public static readonly AMAZON_TITAN_EMBED_TEXT_V2_0_8K = new FoundationModelIdentifier('amazon.titan-embed-text-v2:0:8k'); /** Base model "amazon.titan-image-generator-v1". */ public static readonly AMAZON_TITAN_IMAGE_GENERATOR_G1_V1 = new FoundationModelIdentifier('amazon.titan-image-generator-v1'); @@ -69,7 +69,7 @@ export class FoundationModelIdentifier { public static readonly AI21_LABS_JURASSIC_2_ULTRA_V1 = new FoundationModelIdentifier('ai21.j2-ultra-v1'); /** Base model "ai21.j2-ultra-v1:0:8k". */ - public static readonly AI21_LABS_JURASSIC_2_ULTRA_V1_0_8k = new FoundationModelIdentifier('ai21.j2-ultra-v1:0:8k'); + public static readonly AI21_LABS_JURASSIC_2_ULTRA_V1_0_8K = new FoundationModelIdentifier('ai21.j2-ultra-v1:0:8k'); /** Base model "ai21.j2-grande-instruct". */ public static readonly AI21_J2_GRANDE_INSTRUCT = new FoundationModelIdentifier('ai21.j2-grande-instruct'); From b8d3e8eef93e22fa95dba4746c7f857282902987 Mon Sep 17 00:00:00 2001 From: mazyu36 Date: Wed, 26 Jun 2024 21:06:16 +0900 Subject: [PATCH 4/4] Update packages/aws-cdk-lib/aws-bedrock/lib/foundation-model.ts Co-authored-by: Jimmy Gaussen --- packages/aws-cdk-lib/aws-bedrock/lib/foundation-model.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/aws-cdk-lib/aws-bedrock/lib/foundation-model.ts b/packages/aws-cdk-lib/aws-bedrock/lib/foundation-model.ts index ba39e5f31fbe9..bfabc3dfea97f 100644 --- a/packages/aws-cdk-lib/aws-bedrock/lib/foundation-model.ts +++ b/packages/aws-cdk-lib/aws-bedrock/lib/foundation-model.ts @@ -78,7 +78,7 @@ export class FoundationModelIdentifier { public static readonly AI21_J2_JUMBO_INSTRUCT = new FoundationModelIdentifier('ai21.j2-jumbo-instruct'); /** Base model "ai21.jamba-instruct-v1:0". */ - public static readonly AI21_J2_JAMBA_INSTRUCT = new FoundationModelIdentifier('ai21.jamba-instruct-v1:0'); + public static readonly AI21_J2_JAMBA_INSTRUCT_V1_0 = new FoundationModelIdentifier('ai21.jamba-instruct-v1:0'); /** * Base model "anthropic.claude-v1".