Skip to content

Commit

Permalink
chore(layer): update lambda layer construct and announce deprecation (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
krokoko authored Jun 24, 2024
1 parent f437ca1 commit 2d3a928
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 30 deletions.
9 changes: 0 additions & 9 deletions apidocs/classes/QaAppsyncOpensearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ The QaAppsyncOpensearch class.
- [securityGroup](QaAppsyncOpensearch.md#securitygroup)
- [stage](QaAppsyncOpensearch.md#stage)
- [vpc](QaAppsyncOpensearch.md#vpc)
- [CONSTRUCT\_SCHEMA\_UPDATE\_WARNING](QaAppsyncOpensearch.md#construct_schema_update_warning)
- [usageMetricMap](QaAppsyncOpensearch.md#usagemetricmap)

### Methods
Expand Down Expand Up @@ -241,14 +240,6 @@ Returns the instance of ec2.IVpc used by the construct

___

### CONSTRUCT\_SCHEMA\_UPDATE\_WARNING

`Static` `Readonly` **CONSTRUCT\_SCHEMA\_UPDATE\_WARNING**: ``"\n Attention QaAppsyncOpensearch users, an update has been made to \n the GraphQL schema.To ensure continued functionality, please review \n and update your GraphQL mutations and subscriptions to align with \n the new schema.This schema update enables enhanced capabilities \n and optimizations,so adopting the changes is recommended. \n Please refer to the construct documentation for details \n on the schema changes and examples of updated GraphQL statements.\n Reach out to the support team if you need assistance \n updating your integration codebase. \n "``

Construct warning

___

### usageMetricMap

`Static` `Protected` **usageMetricMap**: `Record`\<`string`, `number`\>
Expand Down
8 changes: 2 additions & 6 deletions layers/langchain-common-deps/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
boto3>=1.34.29
botocore>=1.34.29
requests==2.32.0
requests-aws4auth==1.2.3
langchain==0.2.5
opensearch-py==2.4.2
openai==1.10.0
langchain-community==0.2.5
langchain-aws==0.1.6
3 changes: 3 additions & 0 deletions src/patterns/gen-ai/aws-langchain-common-layer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* and limitations under the License.
*/
import * as path from 'path';
import { Annotations } from 'aws-cdk-lib';
import * as lambda from 'aws-cdk-lib/aws-lambda';
import { Construct } from 'constructs';
import { Layer } from '../../../common/helpers/python-lambda-layer-helper';
Expand Down Expand Up @@ -108,6 +109,8 @@ export class LangchainCommonLayer extends Construct {
constructor(scope: Construct, id: string, props: AdapterProps) {
super(scope, id);

Annotations.of(scope).addWarningV2('@cdklabs/generative-ai-cdk-constructs:LangchainCommonLayer.deprecation', 'This construct is deprecated and will not receive further support. It will be removed in the next release of the library.');

const layer = new lambda.LayerVersion(this, 'Model Adapter Layer', {
code: lambda.Code.fromAsset(path.join(__dirname, '../../../../layers/langchain-common-layer')),
description: 'Utilities to instantiate a llm client adapter. Adapters include bedrock, sagemaker, and openai',
Expand Down
15 changes: 0 additions & 15 deletions src/patterns/gen-ai/aws-qa-appsync-opensearch/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,21 +148,6 @@ export interface QaAppsyncOpensearchProps {
* @summary The QaAppsyncOpensearch class.
*/
export class QaAppsyncOpensearch extends BaseClass {
/**
* Construct warning
*/
public static readonly CONSTRUCT_SCHEMA_UPDATE_WARNING=`
Attention QaAppsyncOpensearch users, an update has been made to
the GraphQL schema.To ensure continued functionality, please review
and update your GraphQL mutations and subscriptions to align with
the new schema.This schema update enables enhanced capabilities
and optimizations,so adopting the changes is recommended.
Please refer to the construct documentation for details
on the schema changes and examples of updated GraphQL statements.
Reach out to the support team if you need assistance
updating your integration codebase.
`;

/**
* Returns the instance of ec2.IVpc used by the construct
*/
Expand Down

0 comments on commit 2d3a928

Please sign in to comment.