Class: BufferMemory
memory.BufferMemory
Hierarchy
↳
BufferMemory
Implements
BufferMemoryInput
Constructors
constructor
• new BufferMemory(fields?
)
Parameters
Name | Type |
---|---|
fields? | Partial <BufferMemoryInput > |
Overrides
Defined in
langchain/src/memory/buffer_memory.ts:17
Properties
aiPrefix
• aiPrefix: string
= "AI"
Implementation of
BufferMemoryInput.aiPrefix
Defined in
langchain/src/memory/buffer_memory.ts:13
chatHistory
• chatHistory: ChatMessageHistory
Implementation of
BufferMemoryInput.chatHistory
Inherited from
Defined in
langchain/src/memory/chat_memory.ts:39
humanPrefix
• humanPrefix: string
= "Human"
Implementation of
BufferMemoryInput.humanPrefix
Defined in
langchain/src/memory/buffer_memory.ts:11
inputKey
• Optional
inputKey: string
Implementation of
BufferMemoryInput.inputKey
Inherited from
Defined in
langchain/src/memory/chat_memory.ts:43
memoryKey
• memoryKey: string
= "history"
Implementation of
BufferMemoryInput.memoryKey
Defined in
langchain/src/memory/buffer_memory.ts:15
outputKey
• Optional
outputKey: string
Implementation of
BufferMemoryInput.outputKey
Inherited from
Defined in
langchain/src/memory/chat_memory.ts:45
returnMessages
• returnMessages: boolean
= false
Implementation of
BufferMemoryInput.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_memory.ts:29
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