From c6df820164e045175dfa2cb22d64877c261b326c Mon Sep 17 00:00:00 2001 From: Raila23 <3271405327@qq.com> Date: Sat, 12 Apr 2025 15:34:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D:=E6=AF=8F=E6=AC=A1=E6=B8=85?= =?UTF-8?q?=E9=99=A4=E7=9A=84=E6=B6=88=E6=81=AF=EF=BC=8C=E6=AF=94=E5=AE=9E?= =?UTF-8?q?=E9=99=85=E4=B8=8A=E6=9C=9F=E6=9C=9B=E7=9A=84=E5=A4=9A1?= =?UTF-8?q?=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astrbot/core/pipeline/process_stage/method/llm_request.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/astrbot/core/pipeline/process_stage/method/llm_request.py b/astrbot/core/pipeline/process_stage/method/llm_request.py index 617e458c8..90c7d6256 100644 --- a/astrbot/core/pipeline/process_stage/method/llm_request.py +++ b/astrbot/core/pipeline/process_stage/method/llm_request.py @@ -146,7 +146,7 @@ class LLMRequestSubStage(Stage): ): logger.debug("上下文长度超过限制,将截断。") req.contexts = req.contexts[ - -(self.max_context_length - self.dequeue_context_length) * 2 : + -(self.max_context_length - self.dequeue_context_length + 1) * 2 : ] # session_id