Session store persists session data such as state and chat messages.

interface SessionStore<S = any> {
    get(sessionId: string): Promise<undefined | SessionData<S>>;
    save(sessionId: string, data: Omit<SessionData<S>, "id">): Promise<void>;
}

Type Parameters

  • S = any

Methods

Methods

  • Parameters

    • sessionId: string

    Returns Promise<undefined | SessionData<S>>

  • Parameters

    Returns Promise<void>