LangChain 发布版本
¥LangChain releases
LangChain 生态系统由不同的组件包组成(例如 @langchain/core
、langchain
、@langchain/community
、@langchain/langgraph
以及合作伙伴包等)。
¥The LangChain ecosystem is composed of different component packages (e.g., @langchain/core
, langchain
, @langchain/community
, @langchain/langgraph
, partner packages etc.)
版本控制
¥Versioning
langchain
和 @langchain/core
¥langchain
and @langchain/core
langchain
和 @langchain/core
以 0.Y.Z 的格式跟在 语义版本控制 后面。这些软件包正在快速开发中,因此目前主要版本号为 0。
¥langchain
and @langchain/core
follow semantic versioning in the format of 0.Y.Z. The packages are under rapid development, and so are currently versioning the packages with a major version of 0.
以下情况将进行小版本升级:
¥Minor version increases will occur for:
任何标记为
beta
的公共接口均有重大变更。¥Breaking changes for any public interfaces marked as
beta
.
补丁版本号将增加,适用于:
¥Patch version increases will occur for:
错误修复
¥Bug fixes
新功能
¥New features
任何对私有接口的变更
¥Any changes to private interfaces
任何对
beta
功能的变更¥Any changes to
beta
features
在次要版本之间升级时,用户应查看重大变更和弃用列表。
¥When upgrading between minor versions, users should review the list of breaking changes and deprecations.
我们会不时将版本包发布为候选版本。这些版本计划作为稳定版本发布,但我们希望在此之前获得社区的反馈。候选版本号为 0.Y.Z-rc.N。例如,0.2.0-rc.1
。如果没有发现任何问题,候选版本将以相同版本号的稳定版本发布。\如果发现问题,我们将发布一个新的候选版本,其 N
值会增加(例如 0.2.0-rc.2
)。
¥From time to time, we will version packages as release candidates. These are versions that are intended to be released as stable versions, but we want to get feedback from the community before doing so.
Release candidates will be versioned as 0.Y.Z-rc.N. For example, 0.2.0-rc.1
. If no issues are found, the release candidate will be released as a stable version with the same version number.
\If issues are found, we will release a new release candidate with an incremented N
value (e.g., 0.2.0-rc.2
).
langchain 生态系统中的其他软件包
¥Other packages in the langchain ecosystem
生态系统中的其他软件包(包括用户软件包)可以遵循不同的版本控制方案,但通常需要将其固定在 langchain
和 @langchain/core
的特定次要版本上。
¥Other packages in the ecosystem (including user packages) can follow a different versioning scheme, but are generally expected to pin to specific minor versions of langchain
and @langchain/core
.
发布节奏
¥Release cadence
我们预计 langchain
和 @langchain/core
的小版本发布(例如,从 0.2.0 到 0.3.0)至少间隔 2-3 个月,因为这些版本可能包含重大更改。
¥We expect to space out minor releases (e.g., from 0.2.0 to 0.3.0) of langchain
and @langchain/core
by at least 2-3 months, as such releases may contain breaking changes.
补丁版本号会频繁发布,因为它们包含错误修复和新功能。
¥Patch versions are released frequently as they contain bug fixes and new features.
API 稳定性
¥API stability
LLM 应用的开发是一个快速发展的字段,我们不断向用户和社区学习。因此,我们预计 langchain
和 @langchain/core
中的 API 将持续发展,以更好地满足用户的需求。
¥The development of LLM applications is a rapidly evolving field, and we are constantly learning from our users and the community. As such, we expect that the APIs in langchain
and @langchain/core
will continue to evolve to better serve the needs of our users.
尽管 langchain
和 @langchain/core
目前都处于 1.0 之前的版本,但我们致力于维护这些包中 API 的稳定性。
¥Even though both langchain
and @langchain/core
are currently in a pre-1.0 state, we are committed to maintaining API stability in these packages.
对公共 API 的重大变更将导致版本号小幅提升(第二位数字)。
¥Breaking changes to the public API will result in a minor version bump (the second digit)
任何错误修复或新功能都会导致补丁版本号上升(第三位数字)
¥Any bug fixes or new features will result in a patch version bump (the third digit)
我们通常会尽量避免进行不必要的更改,并为即将被移除的功能提供弃用政策。
¥We will generally try to avoid making unnecessary changes, and will provide a deprecation policy for features that are being removed.
其他软件包的稳定性
¥Stability of other packages
LangChain 生态系统中其他软件包的稳定性可能有所不同:
¥The stability of other packages in the LangChain ecosystem may vary:
@langchain/community
是一个社区维护的软件包,包含第三方集成。虽然我们尽最大努力审查和测试@langchain/community
中的更改,但由于@langchain/community
包含许多社区贡献,预计它会比langchain
和@langchain/core
经历更多重大更改。¥
@langchain/community
is a community maintained package that contains 3rd party integrations. While we do our best to review and test changes in@langchain/community
,@langchain/community
is expected to experience more breaking changes thanlangchain
and@langchain/core
as it contains many community contributions.合作伙伴包可能遵循不同的稳定性和版本控制策略,用户应参考这些包的文档了解更多信息;但是,通常这些软件包应该是稳定的。
¥Partner packages may follow different stability and versioning policies, and users should refer to the documentation of those packages for more information; however, in general these packages are expected to be stable.
什么是 "API 稳定性"?
¥What is a "API stability"?
API 稳定性含义:
¥API stability means:
所有公共 API(本文档中的所有内容)在未提供向后兼容的别名的情况下都不会被移动或重命名。
¥All the public APIs (everything in this documentation) will not be moved or renamed without providing backwards-compatible aliases.
如果这些 API 中添加了新功能(这很有可能),它们不会破坏或改变现有方法的含义。换句话说,"stable" 并不一定意味着 "完成。"
¥If new features are added to these APIs – which is quite possible – they will not break or change the meaning of existing methods. In other words, "stable" does not (necessarily) mean "complete."
如果由于某种原因,某个声明为稳定的 API 必须被移除或替换,它将被声明为已弃用,但至少会在两个次要版本中保留在 API 中。调用已弃用的方法时将发出警告。
¥If, for some reason, an API declared stable must be removed or replaced, it will be declared deprecated but will remain in the API for at least two minor releases. Warnings will be issued when the deprecated method is called.
标记为内部的 API
¥APIs marked as internal
某些 API 以以下几种方式明确标记为“内部”:
¥Certain APIs are explicitly marked as “internal” in a couple of ways:
某些文档会提及内部实现,并以此形式提及。如果文档说明某些内容是内部的,则可能会更改。
¥Some documentation refers to internals and mentions them as such. If the documentation says that something is internal, it may change.
以下划线 (
_
) 为前缀的函数、方法和其他对象。如果任何方法以单个_
开头,则它属于内部 API。¥Functions, methods, and other objects prefixed by a leading underscore (
_
). If any method starts with a single_
, it’s an internal API.异常:某些方法以
_
为前缀,但不包含实现。这些方法旨在被提供实现的子类覆盖。这些方法通常是 LangChain 公共 API 的一部分。¥Exception: Certain methods are prefixed with
_
, but do not contain an implementation. These methods are meant to be overridden by sub-classes that provide the implementation. Such methods are generally part of the Public API of LangChain.
弃用政策
¥Deprecation policy
在出现更好的替代方案之前,我们通常会避免弃用某些功能。
¥We will generally avoid deprecating features until a better alternative is available.
当某个功能被弃用时,它将在当前版本和下一个次要版本的 langchain
和 @langchain/core
中继续有效。之后,该功能将被移除。
¥When a feature is deprecated, it will continue to work in the current and next minor version of langchain
and @langchain/core
. After that, the feature will be removed.
由于我们预计小版本发布间隔至少 2-3 个月,这意味着某个功能可能会在弃用后 2-6 个月内被移除。
¥Since we're expecting to space out minor releases by at least 2-3 months, this means that a feature can be removed within 2-6 months of being deprecated.
在某些情况下,如果该功能不会在软件包中造成问题,我们可能会允许其在代码库中保留更长时间,以减轻用户的负担。
¥In some situations, we may allow the feature to remain in the code base for longer periods of time, if it's not causing issues in the packages, to reduce the burden on users.