mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-16 17:53:37 +00:00
<langchain_community\llms\chatglm.py>: <Correcting "history"> (#16729)
Use the real "history" provided by the original program instead of putting "None" in the history. - **Description:** I change one line in the code to make it return the "history" of the chat model. - **Issue:** At the moment it returns only the answers of the chat model. However the chat model himself provides a history more complet with the questions of the user. - **Dependencies:** no dependencies required for this change,
This commit is contained in:
parent
4a027e622f
commit
32cad38ec6
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user