update chatglm_llm.py

This commit is contained in:
imClumsyPanda 2023-06-07 21:25:40 +08:00
parent bb8224025e
commit 46b872a854
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ class ChatGLM(BaseAnswer, LLM, ABC):
for inum, (stream_resp, _) in enumerate(self.checkPoint.model.stream_chat(
self.checkPoint.tokenizer,
prompt,
history=history[-self.history_len:] if self.history_len > 0 else [],
history=history[-self.history_len:-1] if self.history_len > 1 else [],
max_length=self.max_token,
temperature=self.temperature
)):