Amazon AWS DynamoDB is a fully managed NoSQL
database service that provides fast and predictable performance with seamless scalability.
This notebook goes over how to use DynamoDB
to store chat message history with DynamoDBChatMessageHistory
class.
langchain-community
package, so we need to install that. We also need to install the boto3
package.
DynamoDB
Table where we will be storing messages:
endpoint_url
parameter in the constructor.
{"SessionId": self.session_id}
, but you can modify this to match your table design.
{self.primary_key_name: self.session_id}
key
parameter.
Passing a value for key will override the primary_key parameter, and the resulting key structure will be the passed value.