Lhumpal commited on
Commit
59f6fc6
·
verified ·
1 Parent(s): 91cfa11

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -93,7 +93,7 @@ async def chat(request: ChatRequest):
93
  system_instruction=["You are a helpful assistant who is an expert at summarization."]
94
  ),
95
  )
96
- request.chat_history = request.chat_history[-(summary_thresh+1):] # keep last k items
97
  request.chat_history.insert(1,
98
  {"role": "user",
99
  "parts": [{"text": f"Here is a summary of this conversation so far: {summary_response.text}"}]})
 
93
  system_instruction=["You are a helpful assistant who is an expert at summarization."]
94
  ),
95
  )
96
+ request.chat_history = request.chat_history[-(summary_thresh+2):] # keep last k items
97
  request.chat_history.insert(1,
98
  {"role": "user",
99
  "parts": [{"text": f"Here is a summary of this conversation so far: {summary_response.text}"}]})