Class ZepMemory

Class used to manage the memory of a chat session, including loading and saving the chat history, and clearing the memory when needed. It uses the ZepClient to interact with the Zep service for managing the chat session's memory.

Hierarchy

Implements

Constructors

Properties

aiPrefix: string = "AI"
baseURL: string
humanPrefix: string = "Human"
memoryKey: string = "history"
returnMessages: boolean = false
sessionId: string
zepClientPromise: Promise<default>
inputKey?: string
outputKey?: string

Accessors

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

Methods

  • Method that deletes the chat history from the Zep service.

    Returns Promise<void>

    Promise that resolves when the chat history has been deleted.

  • Method that retrieves the chat history from the Zep service and formats it into a list of messages.

    Parameters

    Returns Promise<MemoryVariables>

    Promise that resolves with the chat history formatted into a list of messages.

  • Method that saves the input and output messages to the Zep service.

    Parameters

    Returns Promise<void>

    Promise that resolves when the messages have been saved.

Generated using TypeDoc