JSPM

  • Created
  • Published
  • Downloads 157456
  • Score
    100M100P100Q177752F
  • License MIT

In-memory state adapter for chat (development/testing)

Package Exports

  • @chat-adapter/state-memory

Readme

@chat-adapter/state-memory

npm version npm downloads

In-memory state adapter for Chat SDK. For development and testing only — state is lost on restart.

Installation

npm install chat @chat-adapter/state-memory

Usage

import { Chat } from "chat";
import { createMemoryState } from "@chat-adapter/state-memory";

const bot = new Chat({
  userName: "mybot",
  adapters: { /* ... */ },
  state: createMemoryState(),
});

Documentation

Full documentation at chat-sdk.dev/docs/state/memory.

For production, use Redis or ioredis.

License

MIT