Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
oconpa committed Jan 16, 2024
2 parents 01f6424 + ee64135 commit 0a56464
Show file tree
Hide file tree
Showing 31 changed files with 1,297 additions and 300 deletions.
2 changes: 1 addition & 1 deletion .gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit "$1"
2 changes: 2 additions & 0 deletions .npmignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 18 additions & 2 deletions .projen/deps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 15 additions & 3 deletions .projen/tasks.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 27 additions & 4 deletions .projenrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
import { awscdk } from 'projen';
import { JsonPatch, awscdk } from 'projen';
import { NpmAccess } from 'projen/lib/javascript';
import {
buildMeritBadgerWorkflow,
Expand All @@ -27,15 +27,15 @@ import {
const GITHUB_USER = 'awslabs';
const PUBLICATION_NAMESPACE = 'cdklabs';
const PROJECT_NAME = 'generative-ai-cdk-constructs';
const CDK_VERSION: string = '2.88.0';
const CDK_VERSION: string = '2.114.0';

const project = new awscdk.AwsCdkConstructLibrary({
author: 'Amazon Web Services - Prototyping and Cloud Engineering',
authorAddress: 'https://aws.amazon.com',
authorOrganization: true,
description: 'AWS Generative AI CDK Constructs is a library for well-architected generative AI patterns.',
cdkVersion: CDK_VERSION,
projenVersion: '~0.77.4',
projenVersion: '~0.78.8',
constructsVersion: '10.3.0',
defaultReleaseBranch: 'main',
jsiiVersion: '~5.1.0',
Expand All @@ -45,7 +45,13 @@ const project = new awscdk.AwsCdkConstructLibrary({

// description: undefined, /* The description is just a string that helps people understand the purpose of the package. */
keywords: ['constructs', 'aws-cdk', 'generative-ai', 'emerging-tech'],
devDeps: ['eslint-plugin-header'],
devDeps: [
'@commitlint/config-conventional',
'commitlint',
'eslint-plugin-header',
'husky',
'pinst',
],
deps: ['cdk-nag'],

// Keep synchronized with https://github.com/nodejs/release#release-schedule
Expand Down Expand Up @@ -151,5 +157,22 @@ project.eslint?.addRules({
'header/header': [2, 'header.js'],
});

const packageJson = project.tryFindObjectFile('package.json');
packageJson?.patch(JsonPatch.add('/scripts/prepare', 'husky install')); // yarn 1
packageJson?.patch(JsonPatch.add('/scripts/postinstall', 'husky install')); // yarn 2
packageJson?.patch(JsonPatch.add('/scripts/prepack', 'pinst --disable'));
packageJson?.patch(JsonPatch.add('/scripts/postpack', 'pinst --enable'));

// Add generation of new available models for constructs
project.addTask('generate-models-containers', {
description: 'Generate new list of models available from Jumpstart and DLC containers',
steps: [
{
say: 'Generate new list of models available from Jumpstart and DLC containers',
cwd: project.srcdir+'/patterns/gen-ai/aws-model-deployment-sagemaker/code-generation',
exec: 'npm run generate',
},
],
});

project.synth();
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# CDK Generative AI Constructs V0.1.21 (2024-01-11)

Based on CDK library version 2.114.0

# CDK Generative AI Constructs V0.1.0 (2023-11-30)

Based on CDK library version 2.111.0
Expand Down
4 changes: 2 additions & 2 deletions DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ Default output format [None]: json
```

- [Node](https://nodejs.org/en) >= v20.9.0
- [AWS CDK](https://github.com/aws/aws-cdk/releases/tag/v2.102.0) >= 2.111.0
- [AWS CDK](https://github.com/aws/aws-cdk/releases/tag/v2.102.0) >= 2.114.0
- [Python](https://www.python.org/downloads/) >=3.9
- [Projen](https://github.com/projen/projen) >= 0.77.4
- [Projen](https://github.com/projen/projen) >= 0.78.8
- [Yarn](https://classic.yarnpkg.com/lang/en/docs/cli/install/) >= 1.22.19

You can use the command below to install the dependencies listed above
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ The following constructs are available in the library:
| [Question answering](./src/patterns/gen-ai/aws-qa-appsync-opensearch/) | Question answering with a large language model (Anthropic Claude V2) using a RAG (retrieval augmented generation) source and/or long context. | Amazon OpenSearch, AWS Lambda, Amazon Bedrock, AWS AppSync |
| [Summarization](./src/patterns/gen-ai/aws-summarization-appsync-stepfn/) | Document summarization with a large language model (Anthropic Claude V2). | AWS Lambda, Amazon Bedrock, AWS AppSync and Amazon Elasticache for Redis. |
| [Lambda layer](./src/patterns/gen-ai/aws-langchain-common-layer/) | Python Lambda layer providing dependencies and utilities to develop generative AI applications on AWS. | AWS Lambda, Amazon Bedrock, Amazon SageMaker |
| [SageMaker model deployment](./src/patterns/gen-ai/aws-model-deployment-sagemaker/) | Deploy a foundation model from Amazon SageMaker JumpStart or Hugging Face to an Amazon SageMaker endpoint. | Amazon SageMaker |
| [SageMaker model deployment (Jumpstart)](./src/patterns/gen-ai/aws-model-deployment-sagemaker/README_jumpstart.md) | Deploy a foundation model from Amazon SageMaker JumpStart to an Amazon SageMaker endpoint. | Amazon SageMaker |
| [SageMaker model deployment (Hugging Face)](./src/patterns/gen-ai/aws-model-deployment-sagemaker/README_hugging_face.md) | Deploy a foundation model from Hugging Face to an Amazon SageMaker endpoint. | Amazon SageMaker |
| [SageMaker model deployment (Custom)](./src/patterns/gen-ai/aws-model-deployment-sagemaker/README_custom_sagemaker_endpoint.md) | Deploy a foundation model from an S3 location to an Amazon SageMaker endpoint. | Amazon SageMaker |

# Sample Use Cases

Expand Down
2 changes: 1 addition & 1 deletion docs/generative_ai_cdk_constructs.drawio

Large diffs are not rendered by default.

35 changes: 23 additions & 12 deletions package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/common/helpers/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
* and limitations under the License.
*/
import * as cdk from 'aws-cdk-lib';
/**
* The version of this package
*/
// eslint-disable-next-line @typescript-eslint/no-require-imports
export const version = require('../../../package.json').version;
/**
* @internal This is an internal core function and should not be called directly by Solutions Constructs clients.
*
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ export * from './patterns/gen-ai/aws-summarization-appsync-stepfn';
export * from './patterns/gen-ai/aws-langchain-common-layer';
export * from './patterns/gen-ai/aws-qa-appsync-opensearch';
export * from './patterns/gen-ai/aws-model-deployment-sagemaker';
export { version } from './common/helpers/utils';

0 comments on commit 0a56464

Please sign in to comment.