Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@aws-amplify/ai-constructs
Advanced tools
This package vends L3 CDK Constructs that deploy resources which power AI routes in Amplify apps.
This package vends L3 CDK Constructs that deploy resources which power AI routes in Amplify apps.
Conversation Handler Function L3 CDK Construct provisions resources required to integrate conversation routes (i.e.
defined with a.ai.conversation()
from @aws-amplify/data-schema
) with AI models provided by AWS Bedrock service.
Resources deployed by this construct include:
This construct is used implicitly by @aws-amplify/data-construct
when conversational routes don't specify
handler reference. In this case default implementation provided by Amplify is deployed.
Alternatively, a custom lambda implementation can be provided by explicitly including this construct in backend definition and referencing it in schema.
import { App, Stack } from 'aws-cdk-lib';
import { ConversationHandlerFunction } from '@aws-amplify/ai-constructs/conversation';
const app = new App();
const stack = new Stack(app, 'ConversationHandlerStack');
new ConversationHandlerFunction(stack, {
models: [
{
modelId: 'anthropic.claude-3-haiku-20240307-v1:0',
region: 'us-east-1',
},
],
});
import { App, Stack } from 'aws-cdk-lib';
import { ConversationHandlerFunction } from '@aws-amplify/ai-constructs/conversation';
import path from 'path';
const app = new App();
const stack = new Stack(app, 'ConversationHandlerStack');
new ConversationHandlerFunction(stack, {
entry: path.resolve('./custom_handler.ts'),
models: [
{
modelId: 'anthropic.claude-3-haiku-20240307-v1:0',
region: 'us-east-1',
},
],
});
FAQs
This package vends L3 CDK Constructs that deploy resources which power AI routes in Amplify apps.
The npm package @aws-amplify/ai-constructs receives a total of 5,684 weekly downloads. As such, @aws-amplify/ai-constructs popularity was classified as popular.
We found that @aws-amplify/ai-constructs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 9 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.