EC2 Default User commited on
Commit
634b74b
1 Parent(s): 45301ee

add converstation limit

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -54,7 +54,7 @@ s3 = boto3.client('s3')
54
  transcribe = boto3.client('transcribe')
55
 
56
 
57
- memory = ConversationSummaryBufferMemory(llm=ChatOpenAI(), max_token_limit=2048)
58
  conversation = ConversationChain(
59
  llm=OpenAI(streaming=True, callbacks=[StreamingStdOutCallbackHandler()], max_tokens=2048, temperature=0.5),
60
  memory=memory,
 
54
  transcribe = boto3.client('transcribe')
55
 
56
 
57
+ memory = ConversationSummaryBufferMemory(llm=ChatOpenAI(), max_token_limit=2048, k=3)
58
  conversation = ConversationChain(
59
  llm=OpenAI(streaming=True, callbacks=[StreamingStdOutCallbackHandler()], max_tokens=2048, temperature=0.5),
60
  memory=memory,