Class that manages and manipulates previous chat messages. It extends from the BaseChatMemory class and implements the CombinedMemoryInput interface.

Hierarchy (view full)

Implements

Constructors

Properties

aiPrefix: string = "AI"
chatHistory: BaseChatMessageHistory
humanPrefix: string = "Human"
memories: BaseMemory[] = []
memoryKey: string = "history"
returnMessages: boolean = false
inputKey?: string
outputKey?: string

Accessors

Methods

  • Loads memory variables from all memory objects.

    Parameters

    • inputValues: InputValues

      Input values to load memory variables from.

    Returns Promise<MemoryVariables>

    Promise that resolves with an object containing the loaded memory variables.

  • Saves the context to all memory objects.

    Parameters

    • inputValues: InputValues

      Input values to save.

    • outputValues: OutputValues

      Output values to save.

    Returns Promise<void>

    Promise that resolves when the context has been saved to all memory objects.

""