Class for managing chat message memory using the Motorhead service. It extends BaseChatMemory and includes methods for initializing the memory, loading memory variables, and saving the context.

Hierarchy (view full)

Constructors

Properties

apiKey?: string
caller: AsyncCaller
chatHistory: BaseChatMessageHistory
clientId?: string
context?: string
inputKey?: string
memoryKey: string = "history"
outputKey?: string
returnMessages: boolean
sessionId: string
timeout: number = 3000
url: string = MANAGED_URL

Accessors

Methods

  • Method to clear the chat history.

    Returns Promise<void>

    Promise that resolves when the chat history has been cleared.

  • Method that saves the context to the Motorhead service and the base chat memory. It sends a POST request to the Motorhead service with the input and output messages, and calls the saveContext method of the base chat memory.

    Parameters

    Returns Promise<void>

    A promise that resolves when the context is saved.