chatHistory
that backs chat memory classes like BufferMemory
for a DynamoDB instance.
Setup
First, install the AWS DynamoDB client in your project:npm
npm
langchain
, and name your partition key id
. Make sure your partition key is a string. You can leave sort key and the other settings alone.
You’ll also need to retrieve an AWS access key and secret key for a role or user that has access to the table and add them to your environment variables.