01. ConversationBufferMemory
ConversationBufferMemory
from langchain.memory import ConversationBufferMemorymemory = ConversationBufferMemory()
memory.save_context(
inputs={
"human": "Hello, I want to open a bank account remotely. How to start?"
},
outputs={
"ai": "Hello! We are glad that you would like to open an account. First, Please prepare your ID for verification.?"
},
)# 'history' heck the conversation history saved in the key.
memory.load_memory_variables({})Apply to Chain
Last updated