Class BaseMemoryAbstract

Abstract base class for memory in LangChain's Chains. Memory refers to the state in Chains. It can be used to store information about past executions of a Chain and inject that information into the inputs of future executions of the Chain.

Hierarchy

  • BaseMemory

Constructors

Accessors

Methods

Constructors

Accessors

Methods

  • Abstract method that should take an object of input values and return a Promise that resolves with an object of memory variables. The implementation of this method should load the memory variables from the provided input values.

    Parameters

    Returns Promise<MemoryVariables>

    Promise that resolves with an object of memory variables.

  • Abstract method that should take two objects, one of input values and one of output values, and return a Promise that resolves when the context has been saved. The implementation of this method should save the context based on the provided input and output values.

    Parameters

    Returns Promise<void>

    Promise that resolves when the context has been saved.

Generated using TypeDoc