Class: BufferWindowMemory
memory.BufferWindowMemory
Hierarchy
↳
BufferWindowMemory
Implements
BufferWindowMemoryInput
Constructors
constructor
• new BufferWindowMemory(fields?)
Parameters
| Name | Type | 
|---|---|
fields? | Partial<BufferWindowMemoryInput> | 
Overrides
Defined in
langchain/src/memory/buffer_window_memory.ts:24
Properties
aiPrefix
• aiPrefix: string = "AI"
Implementation of
BufferWindowMemoryInput.aiPrefix
Defined in
langchain/src/memory/buffer_window_memory.ts:18
chatHistory
• chatHistory: ChatMessageHistory
Implementation of
BufferWindowMemoryInput.chatHistory
Inherited from
Defined in
langchain/src/memory/chat_memory.ts:39
humanPrefix
• humanPrefix: string = "Human"
Implementation of
BufferWindowMemoryInput.humanPrefix
Defined in
langchain/src/memory/buffer_window_memory.ts:16
inputKey
• Optional inputKey: string
Implementation of
BufferWindowMemoryInput.inputKey
Inherited from
Defined in
langchain/src/memory/chat_memory.ts:43
k
• k: number = 5
Implementation of
BufferWindowMemoryInput.k
Defined in
langchain/src/memory/buffer_window_memory.ts:22
memoryKey
• memoryKey: string = "history"
Implementation of
BufferWindowMemoryInput.memoryKey
Defined in
langchain/src/memory/buffer_window_memory.ts:20
outputKey
• Optional outputKey: string
Implementation of
BufferWindowMemoryInput.outputKey
Inherited from
Defined in
langchain/src/memory/chat_memory.ts:45
returnMessages
• returnMessages: boolean = false
Implementation of
BufferWindowMemoryInput.returnMessages
Inherited from
Defined in
langchain/src/memory/chat_memory.ts:41
Methods
loadMemoryVariables
▸ loadMemoryVariables(_values): Promise<MemoryVariables>
Parameters
| Name | Type | 
|---|---|
_values | InputValues | 
Returns
Promise<MemoryVariables>
Overrides
BaseChatMemory.loadMemoryVariables
Defined in
langchain/src/memory/buffer_window_memory.ts:35
saveContext
▸ saveContext(inputValues, outputValues): Promise<void>
Parameters
| Name | Type | 
|---|---|
inputValues | InputValues | 
outputValues | OutputValues | 
Returns
Promise<void>
Inherited from
Defined in
langchain/src/memory/chat_memory.ts:55