Class EntityMemory

Class for managing entity extraction and summarization to memory in chatbot applications. Extends the BaseChatMemory class and implements the EntityMemoryInput interface.

Hierarchy

Implements

  • EntityMemoryInput

Constructors

Properties

chatHistoryKey: string = "history"
entitiesKey: string = "entities"
entityCache: string[] = []
entityStore: BaseEntityStore
k: number = 3
returnMessages: boolean = false
aiPrefix?: string
humanPrefix?: string
inputKey?: string
outputKey?: string

Accessors

  • get memoryKeys(): string[]
  • Returns string[]

  • get memoryVariables(): string[]
  • Returns string[]

Methods

  • Method to clear the memory contents.

    Returns Promise<void>

    Promise resolving to void.

  • Method to load memory variables and perform entity extraction.

    Parameters

    Returns Promise<MemoryVariables>

    Promise resolving to an object containing memory variables.

  • Method to save the context from a conversation to a buffer and perform entity summarization.

    Parameters

    Returns Promise<void>

    Promise resolving to void.

Generated using TypeDoc