diff --git a/libs/community/langchain_community/llms/chatglm.py b/libs/community/langchain_community/llms/chatglm.py index 84e2294c05d..bdd55946606 100644 --- a/libs/community/langchain_community/llms/chatglm.py +++ b/libs/community/langchain_community/llms/chatglm.py @@ -125,5 +125,5 @@ class ChatGLM(LLM): if stop is not None: text = enforce_stop_tokens(text, stop) if self.with_history: - self.history = self.history + [[None, parsed_response["response"]]] + self.history = parsed_response["history"] return text