Spaces:
Sleeping
Sleeping
Tuchuanhuhuhu commited on
Commit ·
d026b85
1
Parent(s): afaf18f
bugfix: 修复从历史记录中恢复时重试会出错的问题
Browse files
modules/models/base_model.py
CHANGED
|
@@ -481,6 +481,7 @@ class BaseLLMModel:
|
|
| 481 |
if len(self.history) > 0:
|
| 482 |
inputs = self.history[-2]["content"]
|
| 483 |
del self.history[-2:]
|
|
|
|
| 484 |
self.all_token_counts.pop()
|
| 485 |
elif len(chatbot) > 0:
|
| 486 |
inputs = chatbot[-1][0]
|
|
|
|
| 481 |
if len(self.history) > 0:
|
| 482 |
inputs = self.history[-2]["content"]
|
| 483 |
del self.history[-2:]
|
| 484 |
+
if len(self.all_token_counts) > 0:
|
| 485 |
self.all_token_counts.pop()
|
| 486 |
elif len(chatbot) > 0:
|
| 487 |
inputs = chatbot[-1][0]
|