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