Skip to content

Commit

Permalink
chore(bedrock): add missing models and fix typo (#30668)
Browse files Browse the repository at this point in the history
Add missing models.

```ts
ai21.j2-ultra-v1:0:8k
ai21.jamba-instruct-v1:0
amazon.titan-embed-text-v2:0:8k
anthropic.claude-3-5-sonnet-20240620-v1:0
cohere.embed-english-v3:0:512
cohere.embed-multilingual-v3:0:512
mistral.mistral-small-2402-v1:0
```

Also, fix typo.
`ccohere.command-r-v1:0` -> `cohere.command-r-v1:0`


Ref:
* https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
mazyu36 authored Jun 26, 2024
1 parent b880067 commit dfc12aa
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion packages/aws-cdk-lib/aws-bedrock/lib/foundation-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand All @@ -65,12 +68,18 @@ 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');

/** 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_V1_0 = new FoundationModelIdentifier('ai21.jamba-instruct-v1:0');

/**
* Base model "anthropic.claude-v1".
* @deprecated use latest version of the model
Expand Down Expand Up @@ -138,17 +147,23 @@ 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');

/** 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');

Expand Down Expand Up @@ -188,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
Expand Down

0 comments on commit dfc12aa

Please sign in to comment.