Spaces:
Sleeping
Sleeping
Tuchuanhuhuhu
commited on
Commit
·
cbb6284
1
Parent(s):
e898b8a
多文件模式防止token超限
Browse files- modules/base_model.py +4 -2
modules/base_model.py
CHANGED
@@ -324,8 +324,10 @@ class BaseLLMModel:
|
|
324 |
)
|
325 |
|
326 |
if limited_context:
|
327 |
-
self.history = self.history[-4:]
|
328 |
-
self.all_token_counts = self.all_token_counts[-2:]
|
|
|
|
|
329 |
|
330 |
max_token = self.token_upper_limit - TOKEN_OFFSET
|
331 |
|
|
|
324 |
)
|
325 |
|
326 |
if limited_context:
|
327 |
+
# self.history = self.history[-4:]
|
328 |
+
# self.all_token_counts = self.all_token_counts[-2:]
|
329 |
+
self.history = []
|
330 |
+
self.all_token_counts = []
|
331 |
|
332 |
max_token = self.token_upper_limit - TOKEN_OFFSET
|
333 |
|