cima-free-chat / memory.py
ethanrom's picture
Upload 10 files
36c0029
raw
history blame
233 Bytes
from langchain.memory import ConversationBufferWindowMemory
memory3 = ConversationBufferWindowMemory(
k=2, memory_key='chat_history', return_messages=True, output_key='answer', human_prefix="<|user|>", ai_prefix="<|assistant|>")