langchain.js
    Preparing search index...

    Class used to store chat message history in Redis. It provides methods to add, get, and clear messages.

    Hierarchy (View Summary)

    • Toolkit
      • UpstashRedisChatMessageHistory
    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    Properties

    client: Redis
    lc_namespace: string[] = ...

    Accessors

    • get lc_secrets(): { "config.token": string; "config.url": string }

      Returns { "config.token": string; "config.url": string }

    Methods

    • Adds a new message to the chat history in the Redis database.

      Parameters

      • message: BaseMessage

        The message to be added to the chat history.

      Returns Promise<void>

      Promise resolving to void.

    • Deletes all messages from the chat history in the Redis database.

      Returns Promise<void>

      Promise resolving to void.

    • Retrieves the chat messages from the Redis database.

      Returns Promise<BaseMessage[]>

      An array of BaseMessage instances representing the chat history.