Abstract class that provides a base for implementing different types of memory systems. It is designed to maintain the state of an application, specifically the history of a conversation. This class is typically extended by other classes to create specific types of memory systems.

Hierarchy

Constructors

Properties

chatHistory: BaseChatMessageHistory
returnMessages: boolean = false
inputKey?: string
outputKey?: string

Methods

  • Method to add user and AI messages to the chat history in sequence.

    Parameters

    • inputValues: InputValues

      The input values from the user.

    • outputValues: OutputValues

      The output values from the AI.

    Returns Promise<void>

    Promise that resolves when the context has been saved.

Generated using TypeDoc