-
-
Notifications
You must be signed in to change notification settings - Fork 339
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
support langchain>=0.3 and migrate to use pydantic v2 #1003
Comments
@michaelchia Hey Michael, thanks for opening an issue to track this. Our team discussed this issue today and would like to share our thoughts. Right now, Pydantic v1 is still used in ~40% of all environments using Pydantic, and is still a required dependency for many other popular AI/ML packages, such as Given this, we are under the impression that upgrading to LangChain v0.3 will require a major version bump, i.e. a Jupyter AI v3.0.0 release. We don't have a formal timeline/roadmap for the v3.0.0 release yet, but our current goal is to have a pre-release available by the end of 2024. It would be best to open a PR for this only once development work on Jupyter AI v3.0.0 begins on We're open to feedback on this, since we know that users are excited to use LangChain v0.3. However, given Pydantic v1 is still frequently installed in user environments, we think this should be done in a major release (which requires time & planning) instead of a minor one to ensure compatibility for existing users. |
That sounds reasonable. For context on my situation, although I generally want to be able to support the latest versions of dependencies, currently this is not a blocker for me. However, this may be a blocker in the future. Unlikely because of a new feature in langchain itself but more so a critical feature in the langchain partner providers that we depend on. Hopefully this won't occur for awhile and the project will be ready for a prerelease version by then. For complicated reasons out of my control, my users have to use the same dependencies as the one jupyterlab is running on, so I can't have the users running a different kernel/venv with their own langchain version. |
Everything discussed here makes sense. That said, this is currently a blocker for me as we have a hard dependency on Pydantic v2 elsewhere. |
I'd love to see this package upgrade to pydantic v2. If we can help at all, let us know. I don't think 40% of downloads means 40% of AI/ML use cases - I suspect among AI use cases, many of which are newer codebases, the use of v1 is much lower. Also it's more like 30% now.
Apart from |
@samuelcolvin Thank you very much for offering to help! This will require a major release of Jupyter AI, for which we are tracking progress here: #1052. We'll reach out if we run into any issues in the process. 🤗
That's the only one I can name from memory. Probably why the v1 download share has dropped from 40% to 30%. 😁 |
Jupyter AI should work in your environment if it has a hard dependency on Pydantic v2, but only if If you're not using |
Problem
Langchain 0.3 has been released since 16 Sep. https://python.langchain.com/docs/versions/v0_3/
This one might involve some migration to support. Changes are mainly regarding migrating stuff to pydantic v2.
Proposed Solution
Will need to move all the pydantic stuff away from
langchain.pydantic_v1
and to use pydantic v2 from the base package.The text was updated successfully, but these errors were encountered: