Menu

Chat SDK adds PostgreSQL state adapter - Vercel
📰

Chat SDK adds PostgreSQL state adapter - Vercel

Vercel News·Hayden Bleasel·5 months ago
#OpDtzhAb
#vercel#chat#state#adapter#postgresql
Reading 0:00
15s threshold

Chat SDK now supports PostgreSQL as a state backend, joining Redis and ioredis as a production-ready option with the new PostgreSQL adapter .

Teams that already run PostgreSQL can persist subscriptions, distributed locks, and key-value cache state without adding Redis to their infrastructure.

Try the PostgreSQL state adapter today:

import { Chat } from "chat" ;

import { createPostgresState } from "@chat-adapter/state-pg" ;

const bot = new Chat ( {

userName : "mybot" ,

adapters : {

/* ... */

} ,

state : createPostgresState ( ) ,

} ) ;

The adapter uses pg (node-postgres) with raw SQL queries and automatically creates the required tables on first connect.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.