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

Hierarchy

Constructors

Properties

client: Redis

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.

  • Parameters

    • message: string

    Returns Promise<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.

Generated using TypeDoc