Update app.py
Browse files
app.py
CHANGED
@@ -369,8 +369,9 @@ llm = HuggingFaceEndpoint(
|
|
369 |
task="text-generation",
|
370 |
timeout=10
|
371 |
)
|
|
|
372 |
|
373 |
-
llm_chain = LLMChain(prompt=prompt, llm=llm, memory=
|
374 |
|
375 |
agent_tools = [ipc_tool, crpc_tool, doj_tool, faq_tool]
|
376 |
|
|
|
369 |
task="text-generation",
|
370 |
timeout=10
|
371 |
)
|
372 |
+
from langchain.memory import ConversationBufferWindowMemory
|
373 |
|
374 |
+
llm_chain = LLMChain(prompt=prompt, llm=llm, memory=ConversationBufferWindowMemory(k=20))
|
375 |
|
376 |
agent_tools = [ipc_tool, crpc_tool, doj_tool, faq_tool]
|
377 |
|