RoAr777 commited on
Commit
9920d46
·
verified ·
1 Parent(s): 07a35af

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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=ConversationBufferMemory())
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