Kumiko_v1 / chatbot /memory.py
anhkhoiphan's picture
Update chatbot/memory.py
dedac20 verified
raw
history blame
338 Bytes
from langchain.memory import ConversationSummaryBufferMemory
from chatbot.llm import gemini_llm
memory = ConversationSummaryBufferMemory(
llm=gemini_llm,
memory_key="chat_history", # this key will hold the conversation context
max_token_limit=2000, # adjust this limit based on your needs
return_messages=True
)