admin管理员组文章数量:1332872
I am attempting to use LangChain's ConversationSummaryBufferMemory
and running into this error:
pydantic.errors.PydanticUserError: `ConversationSummaryBufferMemory` is not fully defined; you should define `BaseCache`, then call `ConversationSummaryBufferMemory.model_rebuild()`.
This is what my code looks like:
memory = ConversationSummaryBufferMemory(
llm=llm,
input_key="input",
output_key="output",
max_token_limit=args.get("max_tokens", DEFAULT_MAX_TOKENS),
memory_key="chat_history",
)
I am using langchain==0.3.7
.
Has anyone else encountered this?
I am attempting to use LangChain's ConversationSummaryBufferMemory
and running into this error:
pydantic.errors.PydanticUserError: `ConversationSummaryBufferMemory` is not fully defined; you should define `BaseCache`, then call `ConversationSummaryBufferMemory.model_rebuild()`.
This is what my code looks like:
memory = ConversationSummaryBufferMemory(
llm=llm,
input_key="input",
output_key="output",
max_token_limit=args.get("max_tokens", DEFAULT_MAX_TOKENS),
memory_key="chat_history",
)
I am using langchain==0.3.7
.
Has anyone else encountered this?
Share Improve this question asked Nov 21, 2024 at 5:29 Minura PunchihewaMinura Punchihewa 2,0413 gold badges26 silver badges67 bronze badges1 Answer
Reset to default 2pydantic library has been updated.
pip install pydantic==2.9.2
should help
本文标签:
版权声明:本文标题:python - `ConversationSummaryBufferMemory` is not fully defined; you should define `BaseCache`, then call `ConversationSummaryBu 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742312353a2451127.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论