Spaces:
Sleeping
Sleeping
File size: 338 Bytes
dedac20 ed3a456 dedac20 |
1 2 3 4 5 6 7 8 9 10 |
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
)
|