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

Need to update langchain requirements: LangChainDeprecationWarning: Importing chat models from langchain is deprecated #81

Closed
jwmatthews opened this issue Mar 20, 2024 · 2 comments
Assignees
Labels
priority/nextup Issues we want to address soon

Comments

@jwmatthews
Copy link
Member

env/lib/python3.12/site-packages/langchain/chat_models/__init__.py:31: LangChainDeprecationWarning: Importing chat models from langchain is deprecated. Importing from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:

`from langchain_community.chat_models import ChatOpenAI`.

To install langchain-community run `pip install -U langchain-community`.
  warnings.warn(
@jwmatthews jwmatthews added the priority/nextup Issues we want to address soon label Mar 22, 2024
@jwmatthews
Copy link
Member Author

I'm unsure if this is a simple requirement change or if we need to make other changes to upgrade to a newer langchain.

My concern is larger around the IBM Gen AI library and if it will work with newer langchain
https://ibm.github.io/ibm-generative-ai/v2.2.0/rst_source/examples.extensions.langchain.html#examples-extensions-langchain

@jwmatthews jwmatthews added priority/nextup Issues we want to address soon and removed priority/nextup Issues we want to address soon labels Mar 22, 2024
@JonahSussman
Copy link
Contributor

This is because we used langchain.chat_models instead of langchain_community.chat_models. Got a fix in the works, no langchain version change required.

@JonahSussman JonahSussman self-assigned this Mar 22, 2024
JonahSussman added a commit to JonahSussman/kai that referenced this issue Mar 22, 2024
Signed-off-by: JonahSussman <sussmanjonah@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/nextup Issues we want to address soon
Projects
None yet
Development

No branches or pull requests

2 participants