admin管理员组文章数量:1291134
I've created an langchain based agent where I use chain and invoke it. I got this this warning while running it.
LangChainDeprecationWarning: The class LLMChain
was deprecated in LangChain 0.1.17 and will be removed in 1.0. Use :meth:~RunnableSequence, e.g.,
prompt | llm`` instead.
return LLMChain(llm=self.llm, prompt=prompt)
I know i have to give this values to chain prompt | llm
but I use the chain in return.
Please provide me working code for that.
Here is my code where I'm using chain as well as import.
`from langchain.chains import LLMChain
def _create_chain(self, template: str) -> LLMChain:
prompt = ChatPromptTemplate.from_template(template)
return LLMChain(llm=self.llm, prompt=prompt)`
本文标签: pythonLangChainDeprecationWarningStack Overflow
版权声明:本文标题:python - LangChainDeprecationWarning: - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741525485a2383439.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论