frankaging commited on
Commit
de8f900
·
1 Parent(s): 7f543e6
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -90,8 +90,8 @@ def generate(
90
  max_new_tokens: int=DEFAULT_MAX_NEW_TOKENS,
91
  ) -> Iterator[str]:
92
 
93
- # limit to last 3 turns
94
- start_idx = max(0, len(chat_history) - 3)
95
  recent_history = chat_history[start_idx:]
96
 
97
  # build list of messages
 
90
  max_new_tokens: int=DEFAULT_MAX_NEW_TOKENS,
91
  ) -> Iterator[str]:
92
 
93
+ # limit to last 4 turns
94
+ start_idx = max(0, len(chat_history) - 4)
95
  recent_history = chat_history[start_idx:]
96
 
97
  # build list of messages