Spaces:
Runtime error
Runtime error
frankaging
commited on
Commit
·
de8f900
1
Parent(s):
7f543e6
final
Browse files
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
|
| 94 |
-
start_idx = max(0, len(chat_history) -
|
| 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
|