mirror of
https://github.com/vercel/chat.git
synced 2026-09-14 18:32:29 +08:00
28cbcb2994
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@chat-adapter/state-pg
PostgreSQL state adapter for Chat SDK using pg (node-postgres). Suitable for production when PostgreSQL is your primary data store.
Installation
npm install chat @chat-adapter/state-pg
Usage
import { Chat } from "chat";
import { createPostgresState } from "@chat-adapter/state-pg";
const bot = new Chat({
userName: "mybot",
adapters: { /* ... */ },
state: createPostgresState({
url: process.env.POSTGRES_URL!,
}),
});
Documentation
Full documentation at chat-sdk.dev/docs/state/postgres.
License
MIT