LangChain Core #13823
Replies: 9 comments 6 replies
-
Good to see this happening! That was the strategy I followed in the LangChain.dart port since the beginning and I always thought it would be very beneficial for LangChain as well. |
Beta Was this translation helpful? Give feedback.
-
Is there any reason not to follow semantic versioning? I generally expect packages to release breaking changes only in major bumps. |
Beta Was this translation helpful? Give feedback.
-
Update: We've just released the first version of langchain ( If you see any issues with the the new release please let us know! |
Beta Was this translation helpful? Give feedback.
-
Noted, thanks for information. |
Beta Was this translation helpful? Give feedback.
-
One idea from a packaging standpoint would be to use namespace packaging (with
Basically you have separate packages, and they are installed into the same |
Beta Was this translation helpful? Give feedback.
-
One other request is, since we're changing folder structures, can we flatten the overall repo a bit? This entails getting rid of "libs" folder, and having sub-packages at repo root. Less clicking to expand folders, less |
Beta Was this translation helpful? Give feedback.
-
this is super exciting for libs like ragas that are building on top of langchain primitives. Excited to slowly move Ragas over to langchain core under the hood as well |
Beta Was this translation helpful? Give feedback.
-
Is langchain-core released yet ? Also, Is a documentation available for langchain-core part of the update. Just to know what is part of core and what is part of langchain. |
Beta Was this translation helpful? Give feedback.
-
12.12.23 Update: For langchain-core reference documentation, see here. |
Beta Was this translation helpful? Give feedback.
-
TL;DR: we are splitting our core functionality to
langchain-core
to make LangChain more stable and reliable. This should be invisible to the eye and will happen in the background for the next two weeks, and we’d recommend not usinglangchain-core
until then, but we’re flagging for transparency.12.12.23 Update:
langchain-core==0.1.0
is out. This means that any breaking changes to public interfaces in langchain-core will be accompanied by a minor version bump from here on out. The one exception to this is code inlangchain_core.beta
. For the full release and versioning policy, see here.For langchain-core reference documentation, see here.
11.27.23 Update: We've just released the first version of langchain (
0.0.341
) that uses langchain-core (0.0.6
). Again this shouldn't affect langchain usage, and we don't recommend switching application code to using langchain-core directly until langchain-core0.1
, which is scheduled for 12/8.If you see any issues with the the new release please let us know!
Hi all!
As some people may have noticed, we recently split out some code to
langchain-core
. We want to provide a bit of visibility into our thinking and future steps we’re going to take before announcing it more widely.The main driver for this is stability and modularity of the package. There is a LOT in LangChain - we’ve integrated with over 500 different partners. Some parts of the package change rather rapidly - LangChain has also remained 0.0.x to reflect the fast moving nature of the field. This has contributed to a sense of sprawl and instability. We want to make it easy to build on top of LangChain and to benefit from of all the integrations and run-time logic that the community has worked on.
We want to split out core abstractions and runtime logic to a separate
langchain-core
package.langchain-core
will contain interfaces for key abstractions (LLMs, vectorstores, retrievers, etc) as well as logic for combining them in chains (LCEL). This will be a more stable package. It will change less frequently, when there are breaking changes we will reflect that in versioning (see more on versioning below), and we will maintain a stable release. This core library will also have minimal dependencies. This will provide a stable base that not only LangChain but also other libraries and integrations can build upon.We also want to split out key integrations (with the help of partners). This will allow us to properly version those integrations. Right now the biggest source of breaking changes is with integrations. Many integration partners are also moving rapidly, and keeping their SDKs in sync with LangChain abstractions can be tough. By splitting out those integrations into separate packages that can then be versioned independently, we hope to make these integrations more stable and cohesive.
The newest version of
langchain
useslangchain-core
. This was done in a fully backwards compatible way - all previous files inlangchain
should still expose the same classes and methods as before. If you run into any errors - please let us know! We want this to be fully backwards compatible. We also want future version0.1
to be fully backwards compatible. We will only start making breaking changes in0.2
.Versioning for
langchain-core
is currently at0.0.x
. We plan to bump it to0.1
on 12/8 and announce it more widely the following week. This two week buffer is to give us time to work with integration partners to create standalone packages for their integrations. We will also work over that time to fully update documentation (right now there is no reference tolangchain-core
- that is intentional, we do not want people to have to know that it exists yet).We do not intend to split out all integrations into their own packages over the next two weeks. The remaining long tail of integrations will be kept in LangChain. Over time, we will move them out (either to their own individual packages or to a collective package) and LangChain will contain chains and agents - higher level abstractions that are more use case specific.
Overall, we are excited about this, but also recognize that given the size of LangChain this is a large undertaking. If you have feedback on this plan, PLEASE let us know. We are very open to feedback. We want this to be minimally disruptive to everyone already using LangChain, and only provide benefits in the form of more stability and communication.
Beta Was this translation helpful? Give feedback.
All reactions