huolongguo10 commited on
Commit
398bfe6
1 Parent(s): f4e5c25

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -65,8 +65,8 @@ def chatyuan_bot_regenerate(input, history):
65
  history=history[:-1]
66
 
67
 
68
- if len(history) > 5:
69
- history = history[-5:]
70
 
71
  context = "\n".join([f"用户:{input_text}\n小元:{answer_text}" for input_text, answer_text in history])
72
  #print(context)
 
65
  history=history[:-1]
66
 
67
 
68
+ if len(history) > 1:
69
+ history = history[-1:]
70
 
71
  context = "\n".join([f"用户:{input_text}\n小元:{answer_text}" for input_text, answer_text in history])
72
  #print(context)