Spaces:
Sleeping
Sleeping
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 | |
) | |