Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GLM4接入langchain无法识别到RetrievalQA.from_chain_type下面的memory参数 #179

Open
akira149 opened this issue Jun 21, 2024 · 3 comments

Comments

@akira149
Copy link

qa_chain = RetrievalQA.from_chain_type(
llm,
memory = memory,
chain_type="stuff",
retriever=retriever,
return_source_documents=False,
chain_type_kwargs={"prompt": DEFAULT_PROMPT} ,
verbose = True ### 自动生成前缀
)
memory里面有东西,能够被memory_history = memory.load_memory_variables({})显示出来,但是glm4的模型读取不到

@akira149
Copy link
Author

换成了qa_chain = ConversationalRetrievalChain.from_llm(
llm,
chain_type="stuff",
memory = memory,
retriever=retriever,
return_source_documents=False,
verbose = True ### 自动生成前缀
)
也不行。
微信图片_20240621151724

@logan-zou
Copy link
Contributor

您好,我们这里对模型做的封装没有做历史的处理,所以接入langchain之后不能支持记忆功能,如果需要支持记忆功能,可能需要自行修改一下模型封装来支持

@akira149
Copy link
Author

我哭了我哭了,哇啊啊啊啊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants