chatHistory
for a Postgres Database.
Setup
First install the node-postgres package:npm
Usage
Each chat history session is stored in a Postgres database and requires a session id. The connection to postgres is handled through a pool. You can either pass an instance of a pool via thepool
parameter or pass a pool config via the poolConfig
parameter. See pg-node docs on pools
for more information. A provided pool takes precedence, thus if both a pool instance and a pool config are passed, only the pool will be used.