Skip to content

Commit ba29f4d

Browse files
authored
Merge pull request #7 from lifeth/main
Changes to CloudFormation template
2 parents 3ccaa6c + 1fd47e0 commit ba29f4d

File tree

2 files changed

+19
-22
lines changed

2 files changed

+19
-22
lines changed

bedrock/knowledge-base-lex-langsmith/README.md

+18-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
- [Git Installed](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
88
- [AWS Cloud Development Kit](https://docs.aws.amazon.com/cdk/v2/guide/getting_started.html) (AWS CDK) v2 Installed
99
- [NodeJS and NPM](https://nodejs.org/en/download/) Installed
10-
- [Bedrock Model Access](https://docs.aws.amazon.com/bedrock/latest/userguide/model-access.html) Request Access for Anthropic Claude V1 Instant
10+
- [Bedrock Model Access](https://docs.aws.amazon.com/bedrock/latest/userguide/model-access.html) Request Access for Anthropic Claude 3 Sonnet.
1111
- [Bedrock Knowledge Base](https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base.html) Create a Knowledge Base, set a data source, and sync it
1212
- [Langsmith](https://python.langchain.com/docs/get_started/quickstart) Generate a Langchain API key (free)
1313

@@ -42,7 +42,7 @@ cp .env.sample .env
4242
npm install
4343
```
4444

45-
5. The package [https://github.com/awslabs/generative-ai-cdk-constructs](generative-ai-cdk-constructs) should be added to your package.json.
45+
5. The package [generative-ai-cdk-constructs](https://github.com/awslabs/generative-ai-cdk-constructs) should be added to your package.json.
4646

4747
```
4848
npm install @cdklabs/generative-ai-cdk-constructs
@@ -60,6 +60,21 @@ npx cdk synth
6060
npx cdk deploy --require-approval never
6161
```
6262

63+
## Use the Pre-Built AWS CloudFormation Template
64+
1. Log into the [AWS Console](https://us-east-1.console.aws.amazon.com/console/home?region=us-east-1) if you are not already.
65+
2. Choose the Launch Stack button below for your desired AWS region to open the [AWS CloudFormation console](https://us-east-1.console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks?filteringText=&filteringStatus=active&viewNested=true) and create a new stack.
66+
3. Enter the following parameters:
67+
- StackName: Name your Stack, e.g. WhatsAppAIStack.
68+
- LangchainAPIKey: The API key generated through [LangChain](https://docs.smith.langchain.com/how_to_guides/setup/create_account_api_key).
69+
- Check the box to acknowledge creating IAM resources and click “Create Stack”.
70+
- Wait for the stack creation to complete.
71+
72+
Region | Easy Deploy Button | Template URL - use to upgrade existing stack to a new release
73+
--- | --- | ---
74+
N. Virginia (us-east-1) | [![Launch Stack](https://cdn.rawgit.com/buildkite/cloudformation-launch-stack-button-svg/master/launch-stack.svg)](https://us-east-1.console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/create/review?templateURL=https://aws-blogs-artifacts-public.s3.amazonaws.com/ML-16776/template.yml) | [YML](https://aws-blogs-artifacts-public.s3.amazonaws.com/ML-16776/template.yml)
75+
76+
Note: Upload files to the data source (S3) created for WhatsApp. As soon as you upload a file, the data source will synchronize automatically.
77+
6378
## Testing
6479

6580
1. Navigate to Amazon Lex in your AWS account.
@@ -70,7 +85,7 @@ npx cdk deploy --require-approval never
7085

7186
4. Enter a message in the text box and press the Enter key.
7287

73-
5. Navigate to [https://smith.langchain.com](Langsmith) and check the trace of the app.
88+
5. Navigate to [Langsmith](https://smith.langchain.com) and check the trace of the app.
7489

7590
![Alt text](./langsmith_trace.png?raw=true "LangSmith trace")
7691

bedrock/knowledge-base-lex-langsmith/lib/template.yml

+1-19
Original file line numberDiff line numberDiff line change
@@ -1432,22 +1432,4 @@ Outputs:
14321432
Parameters:
14331433
LangchainAPIKey:
14341434
Type: String
1435-
Description: Langsmith API Key.
1436-
BootstrapVersion:
1437-
Type: AWS::SSM::Parameter::Value<String>
1438-
Default: /cdk-bootstrap/hnb659fds/version
1439-
Description: Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]
1440-
Rules:
1441-
CheckBootstrapVersion:
1442-
Assertions:
1443-
- Assert:
1444-
Fn::Not:
1445-
- Fn::Contains:
1446-
- - "1"
1447-
- "2"
1448-
- "3"
1449-
- "4"
1450-
- "5"
1451-
- Ref: BootstrapVersion
1452-
AssertDescription: CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI.
1453-
1435+
Description: Langsmith API Key.

0 commit comments

Comments
 (0)