demetz commited on
Commit
0da7681
·
verified ·
1 Parent(s): 17ee92b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -76,8 +76,8 @@ def respond(message, history):
76
  response += token
77
  yield response
78
 
79
- if len(response) > char_limit:
80
- response = response[:char_limit]
81
 
82
  for punc in [".", "!", "?"]:
83
  i = response.rfind(punc)
 
76
  response += token
77
  yield response
78
 
79
+ if len(response) > max_tokens:
80
+ response = response[:max_tokens]
81
 
82
  for punc in [".", "!", "?"]:
83
  i = response.rfind(punc)