Skip to content

Commit 132eb07

Browse files
aws-rafamskrokoko
andauthored
feat(bedrock): add default prompt router (#882)
* feat(bedrock): add default prompt router * feat(bedrock): syntax change * chore(cdk): upgrade cdk version and fix build * chore(doc): update readme --------- Co-authored-by: krokoko <[email protected]>
1 parent 1d19647 commit 132eb07

27 files changed

+778
-30
lines changed

.gitignore

+9-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.npmignore

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.projen/deps.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.projen/tasks.json

+69
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.projenrc.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import {
2929
const GITHUB_USER = 'awslabs';
3030
const PUBLICATION_NAMESPACE = 'cdklabs';
3131
const PROJECT_NAME = 'generative-ai-cdk-constructs';
32-
const CDK_VERSION: string = '2.174.0';
32+
const CDK_VERSION: string = '2.174.1';
3333

3434
function camelCaseIt(input: string): string {
3535
// Hypens and dashes to spaces and then CamelCase...

CHANGELOG.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
# CDK Generative AI Constructs V0.1.289 (2025-01-08)
1+
# CDK Generative AI Constructs V0.1.290 (2025-01-08)
2+
3+
Based on CDK library version 2.174.1
4+
5+
# CDK Generative AI Constructs V0.1.289 (2025-01-06)
26

37
Based on CDK library version 2.174.0
48

DEVELOPER_GUIDE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Default output format [None]: json
1616
```
1717

1818
- [Node](https://nodejs.org/en) >= v20.9.0
19-
- [AWS CDK](https://github.com/aws/aws-cdk/releases/tag/v2.174.0) >= 2.174.0
19+
- [AWS CDK](https://github.com/aws/aws-cdk/releases/tag/v2.174.1) >= 2.174.1
2020
- [Python](https://www.python.org/downloads/) >=3.9
2121
- [Projen](https://github.com/projen/projen) >= 0.78.8
2222
- [Yarn](https://classic.yarnpkg.com/lang/en/docs/cli/install/) >= 1.22.19

apidocs/namespaces/bedrock/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
- [DataSource](classes/DataSource.md)
5353
- [DataSourceBase](classes/DataSourceBase.md)
5454
- [DataSourceNew](classes/DataSourceNew.md)
55+
- [DefaultPromptRouterIdentifier](classes/DefaultPromptRouterIdentifier.md)
5556
- [Guardrail](classes/Guardrail.md)
5657
- [GuardrailBase](classes/GuardrailBase.md)
5758
- [InferenceProfileBase](classes/InferenceProfileBase.md)
@@ -60,6 +61,7 @@
6061
- [ParsingStategy](classes/ParsingStategy.md)
6162
- [Prompt](classes/Prompt.md)
6263
- [PromptBase](classes/PromptBase.md)
64+
- [PromptRouter](classes/PromptRouter.md)
6365
- [PromptVariant](classes/PromptVariant.md)
6466
- [PromptVersion](classes/PromptVersion.md)
6567
- [S3ApiSchema](classes/S3ApiSchema.md)
@@ -106,6 +108,7 @@
106108
- [IKnowledgeBase](interfaces/IKnowledgeBase.md)
107109
- [InferenceConfiguration](interfaces/InferenceConfiguration.md)
108110
- [IPrompt](interfaces/IPrompt.md)
111+
- [IPromptRouter](interfaces/IPromptRouter.md)
109112
- [KnowledgeBaseAttributes](interfaces/KnowledgeBaseAttributes.md)
110113
- [KnowledgeBaseProps](interfaces/KnowledgeBaseProps.md)
111114
- [LambdaCustomTransformationProps](interfaces/LambdaCustomTransformationProps.md)
@@ -114,6 +117,7 @@
114117
- [PromptConfiguration](interfaces/PromptConfiguration.md)
115118
- [PromptOverrideConfiguration](interfaces/PromptOverrideConfiguration.md)
116119
- [PromptProps](interfaces/PromptProps.md)
120+
- [PromptRouterProps](interfaces/PromptRouterProps.md)
117121
- [PromptVersionProps](interfaces/PromptVersionProps.md)
118122
- [RegexFilter](interfaces/RegexFilter.md)
119123
- [S3DataSourceAssociationProps](interfaces/S3DataSourceAssociationProps.md)
@@ -130,6 +134,10 @@
130134
- [WebCrawlerDataSourceAssociationProps](interfaces/WebCrawlerDataSourceAssociationProps.md)
131135
- [WebCrawlerDataSourceProps](interfaces/WebCrawlerDataSourceProps.md)
132136

137+
## Variables
138+
139+
- [REGION\_TO\_GEO\_AREA](variables/REGION_TO_GEO_AREA.md)
140+
133141
## Functions
134142

135143
- [validateInferenceConfiguration](functions/validateInferenceConfiguration.md)

apidocs/namespaces/bedrock/classes/BedrockFoundationModel.md

+14-2
Original file line numberDiff line numberDiff line change
@@ -197,16 +197,28 @@ The ARN of the Bedrock invokable abstraction.
197197
198198
***
199199

200-
### META\_LLAMA\_3\_2\_11B\_INSTRUCT\_V1
200+
### META\_LLAMA\_3\_1\_70B\_INSTRUCT\_V1
201201

202-
> `readonly` `static` **META\_LLAMA\_3\_2\_11B\_INSTRUCT\_V1**: [`BedrockFoundationModel`](BedrockFoundationModel.md)
202+
> `readonly` `static` **META\_LLAMA\_3\_1\_70B\_INSTRUCT\_V1**: [`BedrockFoundationModel`](BedrockFoundationModel.md)
203+
204+
***
205+
206+
### META\_LLAMA\_3\_1\_8B\_INSTRUCT\_V1
207+
208+
> `readonly` `static` **META\_LLAMA\_3\_1\_8B\_INSTRUCT\_V1**: [`BedrockFoundationModel`](BedrockFoundationModel.md)
203209
204210
*************************************************************************
205211
META
206212
*************************************************************************
207213

208214
***
209215

216+
### META\_LLAMA\_3\_2\_11B\_INSTRUCT\_V1
217+
218+
> `readonly` `static` **META\_LLAMA\_3\_2\_11B\_INSTRUCT\_V1**: [`BedrockFoundationModel`](BedrockFoundationModel.md)
219+
220+
***
221+
210222
### META\_LLAMA\_3\_2\_1B\_INSTRUCT\_V1
211223

212224
> `readonly` `static` **META\_LLAMA\_3\_2\_1B\_INSTRUCT\_V1**: [`BedrockFoundationModel`](BedrockFoundationModel.md)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
[**@cdklabs/generative-ai-cdk-constructs**](../../../README.md)
2+
3+
***
4+
5+
[@cdklabs/generative-ai-cdk-constructs](../../../README.md) / [bedrock](../README.md) / DefaultPromptRouterIdentifier
6+
7+
# Class: DefaultPromptRouterIdentifier
8+
9+
Represents identifiers for default prompt routers in Bedrock
10+
11+
## Properties
12+
13+
### promptRouterId
14+
15+
> `readonly` **promptRouterId**: `string`
16+
17+
***
18+
19+
### routingModels
20+
21+
> `readonly` **routingModels**: [`BedrockFoundationModel`](BedrockFoundationModel.md)[]
22+
23+
***
24+
25+
### ANTHROPIC\_CLAUDE\_V1
26+
27+
> `readonly` `static` **ANTHROPIC\_CLAUDE\_V1**: [`DefaultPromptRouterIdentifier`](DefaultPromptRouterIdentifier.md)
28+
29+
Anthropic Claude V1 router configuration
30+
31+
***
32+
33+
### META\_LLAMA\_3\_1
34+
35+
> `readonly` `static` **META\_LLAMA\_3\_1**: [`DefaultPromptRouterIdentifier`](DefaultPromptRouterIdentifier.md)
36+
37+
Meta Llama 3.1 router configuration

0 commit comments

Comments
 (0)