RFC: Expedited langchain 0.2 release #19083
Replies: 9 comments 2 replies
-
Since we have already started doing this with modules like |
Beta Was this translation helpful? Give feedback.
-
as user come back to langchain because of this change, focus on core not bloated library. so definitely +1 for me. |
Beta Was this translation helpful? Give feedback.
-
Since it is a breaking change, I assume you freeze the 0.1 version. What is the supporting time for it? |
Beta Was this translation helpful? Give feedback.
-
Train a Bot on 0.2 and automated assistance for transition. Shut down all bots providing misleading advices on deprecated setups. Get a crystal clear doc and examples ( not with oldies examples ). Keep this simple, secure and powerful. Resist the bloat. 🤗 |
Beta Was this translation helpful? Give feedback.
-
👍 Remove langchain-community as s dependency but keep conditional imports from it |
Beta Was this translation helpful? Give feedback.
-
Go ahead. It's fine. Help users with proper error messages. That's all you need to do and then drop langchain-community from langchain package. |
Beta Was this translation helpful? Give feedback.
-
Any update as to when this might happen? Will open PRs be closed for it? |
Beta Was this translation helpful? Give feedback.
-
Please update ducumenataion |
Beta Was this translation helpful? Give feedback.
-
Context
Currently
langchain
(the package) depends onlangchain-community
. This is done only for backwards compatibility withlangchain
versions that predate the split oflangchain
andlangchain-community
. Sincelangchain
0.1 we have been planning to remove this dependency inlangchain
0.2 and have added deprecation warnings indicating as much in all places wherelangchain-community
is imported. The main motivation was to make our packages as modular and lightweight as possible. There are a number of other breaking changes we were hoping to make in 0.2 (some listed in #15713).Recently a number of CVE’s have been filed against
langchain
. The relevant code for most of these originates inlangchain-community
and notlangchain
. We have remediated these as quickly as possible by patching the ones we agree with and disputing the others, however it can still take some time for them to be resolved in CVE databases. Having outstanding CVE’s in these databases prevents some organizations from being able to uselangchain
.Proposal
We are proposing that we remove the dependency of
langchain
onlangchain-community
ASAP, and bumplangchain
to 0.2 to reflect this breaking change.To our knowledge there are currently no CVE’s filed against
langchain
that we have not patched and submitted a resolution request for. However, to minimize the possibility of future CVE’s, we are proposing that we remove the dependency oflangchain
onlangchain-community
and all imports fromlangchain-community
.To emphasize,
langchain
0.2 was always slated to drop thelangchain-community
dependency, which was only kept around in 0.1 for backwards compatibility. This is a change we were going to make at some point soon. We had originally planned to make a number of other breaking refactors in 0.2, but given the urgency of preventing any more CVE’s we think it’s best to remove thelangchain-community
dependency now and push back the refactors forlangchain
0.3.Impact
The impact of this change would be:
langchain>=0.2
will not depend onlangchain-community
langchain-community
modules andlangchain>=0.2
you'll need to addlangchain-community
as an explicit dependencylangchain
imports that are actuallylangchain-community
imports under the hood would stop working. e.g. currently you can runeven though the
ChatOllama
implementation lives inlangchain-community
. Importing ChatOllama fromlangchain
raises a DeprecationWarning but it still works. After this change users will need to importlangchain-community
modules fromlangchain-community
directlyWe're working on a migration script that should help correct any
langchain
imports that should belangchain-community
imports.Alternatives
langchain-community
as s dependency but keep conditional imports from it, so that if you have it installed your existinglangchain
imports that uselangchain-community
under the hood will continue to work. We suspect this will cause CVE’s to continue being filed againstlangchain
.langchain-community
as a dependency and bump to 0.2 later along with other breaking changes.Request for comment
We’d love to know what people think of the proposal and its alternatives. The goal is to make life easier for our users, so if this change will cause you any issues we really want to know about it.
Please feel free to leave a comment, or leave a reaction:
👍 Move to 0.2 immediately with the only change being removing the
langchain_community
dependency👎 Wait to remove
langchain_community
until a more proper 0.2 releaseRelated: Security policy
Identifying vulnerabilities so that we can remediate them is invaluable work. To make sure that we can address these as quickly as possible, and to make sure that only real vulnerabilities get filed, please follow our security policy: https://github.com/langchain-ai/langchain/security/policy.
For more on how to build secure LangChain apps, please see our security guidelines: https://python.langchain.com/docs/security.
Beta Was this translation helpful? Give feedback.
All reactions