Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ def respond(
|
|
15 |
temperature,
|
16 |
top_p,
|
17 |
):
|
18 |
-
MAX_HISTORY_LENGTH =
|
19 |
|
20 |
# 限制歷史對話的長度
|
21 |
history = history[-MAX_HISTORY_LENGTH:]
|
|
|
15 |
temperature,
|
16 |
top_p,
|
17 |
):
|
18 |
+
MAX_HISTORY_LENGTH = 20 # 保留最近 5 條歷史
|
19 |
|
20 |
# 限制歷史對話的長度
|
21 |
history = history[-MAX_HISTORY_LENGTH:]
|