Skip to main content

存储库结构

¥Repository Structure

如果你计划为 LangChain 的代码或文档做出贡献,了解存储库的高级结构将很有帮助。

¥If you plan on contributing to LangChain code or documentation, it can be useful to understand the high level structure of the repository.

LangChain 被组织为包含多个包的 monorepo

¥LangChain is organized as a monorepo that contains multiple packages.

以下是以树状图形式显示的架构:

¥Here's the structure visualized as a tree:

.
├── docs
│ ├── core_docs # Contains content for the documentation here: https://langchain.nodejs.cn/
│ ├── api_refs # Contains content for the API refs here: https://api.js.langchain.com/
├── langchain # Main package
│ ├── src/**/tests/*.test.ts/ # Unit tests (present in each package not shown for brevity)
│ ├── src/**/tests/*.int.test.ts/ # Integration tests (present in each package not shown for brevity)
├── langchain # Base interfaces for key abstractions
├── libs # Community packages
│ ├── langchain-community # Third-party integrations
│ ├── langchain-partner-1
│ ├── langchain-partner-2
│ ├── ...

根目录还包含以下文件:

¥The root directory also contains the following files:

  • package.json:用于构建文档和 linting 文档的依赖。

    ¥package.json: Dependencies for building docs and linting docs.

根目录下还有其他文件,但它们的存在应该是不言自明的。随意浏览!

¥There are other files in the root directory level, but their presence should be self-explanatory. Feel free to browse around!

文档

¥Documentation

/docs 目录包含 https://langchain.nodejs.cn/ 中显示的文档内容以及相关的 API 参考 https://api.js.langchain.com/

¥The /docs directory contains the content for the documentation that is shown at https://langchain.nodejs.cn/ and the associated API Reference https://api.js.langchain.com/

请参阅 documentation 指南,了解如何为文档做出贡献。

¥See the documentation guidelines to learn how to contribute to the documentation.

代码

¥Code

/libs 目录包含 LangChain 软件包的代码。

¥The /libs directory contains the code for the LangChain packages.

要了解有关如何贡献代码的更多信息,请参阅以下指南:

¥To learn more about how to contribute code see the following guidelines:

  • 代码 了解如何在 LangChain 代码库中进行开发。

    ¥Code Learn how to develop in the LangChain codebase.

  • 集成 学习如何为 langchain 社区的第三方集成做出贡献或启动新的合作伙伴包。

    ¥Integrations to learn how to contribute to third-party integrations to langchain-community or to start a new partner package.

  • 测试 指南,用于学习如何为软件包编写测试。

    ¥Testing guidelines to learn how to write tests for the packages.