这是用户在 2024-9-8 18:00 为 https://python.langchain.com/v0.2/docs/introduction/ 保存的双语快照页面,由 沉浸式翻译 提供双语支持。了解如何保存?
Skip to main content 跳转到主要内容

Introduction 介绍

LangChain is a framework for developing applications powered by large language models (LLMs).
LangChain是一个用于开发由大型语言模型(LLMs)驱动的应用程序的框架。

LangChain simplifies every stage of the LLM application lifecycle:
LangChain简化了LLM应用程序生命周期的每个阶段:

  • Development: Build your applications using LangChain's open-source building blocks, components, and third-party integrations. Use LangGraph to build stateful agents with first-class streaming and human-in-the-loop support.
    开发:使用LangChain的开源构建块组件第三方集成构建应用程序。使用LangGraph构建具有一流流和人在回路支持的有状态代理。
  • Productionization: Use LangSmith to inspect, monitor and evaluate your chains, so that you can continuously optimize and deploy with confidence.
    生产化:使用LangSmith来检查、监控和评估您的链条,以便您可以充满信心地持续优化和部署。
  • Deployment: Turn your LangGraph applications into production-ready APIs and Assistants with LangGraph Cloud.
    部署:使用LangGraph Cloud将您的LangGraph应用程序转变为生产就绪的API和助手。
Diagram outlining the hierarchical organization of the LangChain framework, displaying the interconnected parts across multiple layers.

Concretely, the framework consists of the following open-source libraries:
具体来说,该框架由以下开源库组成:

  • langchain-core: Base abstractions and LangChain Expression Language.
    langchain-core:基本抽象和LangChain表达式语言。
  • langchain-community: Third party integrations.
    langchain-community:第三方集成。
    • Partner packages (e.g. langchain-openai, langchain-anthropic, etc.): Some integrations have been further split into their own lightweight packages that only depend on langchain-core.
      合作伙伴包(例如langchain-openailangchain-anthropic等):一些集成已经被进一步拆分成自己的轻量级包,只依赖于langchain-core
  • langchain: Chains, agents, and retrieval strategies that make up an application's cognitive architecture.
    langchain:构成应用程序认知架构的链、代理和检索策略。
  • LangGraph: Build robust and stateful multi-actor applications with LLMs by modeling steps as edges and nodes in a graph. Integrates smoothly with LangChain, but can be used without it.
    LangGraph:通过将步骤建模为图中的边和节点,使用LLMs构建健壮且有状态的多角色应用程序。与LangChain顺利集成,但可以在没有它的情况下使用。
  • LangServe: Deploy LangChain chains as REST APIs.
    LangServe:将LangChain链部署为REST API。
  • LangSmith: A developer platform that lets you debug, test, evaluate, and monitor LLM applications.
    LangSmith:一个开发人员平台,允许您调试,测试,评估和监控LLM应用程序。
note 注意

These docs focus on the Python LangChain library. Head here for docs on the JavaScript LangChain library.
这些文档关注Python LangChain库。点击这里查看关于JavaScript LangChain库的文档。

Tutorials
教程

If you're looking to build something specific or are more of a hands-on learner, check out our tutorials section. This is the best place to get started.
如果你想构建一些特定的东西,或者更喜欢动手学习,请查看我们的教程部分。这是最好的地方开始。

These are the best ones to get started with:
这些是最好的开始:

Explore the full list of LangChain tutorials here, and check out other LangGraph tutorials here.
在这里探索LangChain教程的完整列表,并在这里查看其他LangGraph教程

How-to guides
操作指南

Here you’ll find short answers to “How do I….?” types of questions. These how-to guides don’t cover topics in depth – you’ll find that material in the Tutorials and the API Reference. However, these guides will help you quickly accomplish common tasks.
在这里你可以找到“我该如何....”的简短答案。类型的问题。这些操作指南并没有深入地介绍这些主题--您可以在教程API参考中找到相关材料。但是,这些指南将帮助您快速完成常见任务。

Check out LangGraph-specific how-tos here.
在这里查看LangGraph特定的how-to。

Conceptual guide
概念指南

Introductions to all the key parts of LangChain you’ll need to know! Here you'll find high level explanations of all LangChain concepts.
介绍LangChain的所有关键部分,你需要知道!在这里,您可以找到所有LangChain概念的高级解释。

For a deeper dive into LangGraph concepts, check out this page.
要深入了解LangGraph概念,请查看此页面

API reference
API参考

Head to the reference section for full documentation of all classes and methods in the LangChain Python packages.
前往参考部分,查看LangChain Python包中所有类和方法的完整文档。

Ecosystem 生态系统

🦜🛠️ LangSmith
🦜🛠️约翰·史密斯

Trace and evaluate your language model applications and intelligent agents to help you move from prototype to production.
跟踪和评估您的语言模型应用程序和智能代理,帮助您从原型到生产。

🦜🕸️ LangGraph
关于我们

Build stateful, multi-actor applications with LLMs. Integrates smoothly with LangChain, but can be used without it.
使用LLMs构建有状态的多角色应用程序。与LangChain顺利集成,但可以在没有它的情况下使用。

Additional resources
额外资源

Versions
版本

See what changed in v0.2, learn how to migrate legacy code, and read up on our release/versioning policies, and more.
查看v0.2中的变化,了解如何迁移遗留代码,并阅读我们的发布/版本控制策略等。

Security
安全

Read up on security best practices to make sure you're developing safely with LangChain.
阅读安全最佳实践,以确保您使用LangChain安全开发。

Integrations
集成

LangChain is part of a rich ecosystem of tools that integrate with our framework and build on top of it. Check out our growing list of integrations.
LangChain是一个丰富的工具生态系统的一部分,这些工具与我们的框架集成并在其之上构建。查看我们不断增长的集成列表。

Contributing
贡献

Check out the developer's guide for guidelines on contributing and help getting your dev environment set up.
查看开发人员指南,了解有关贡献和帮助设置开发环境的指导方针。


Was this page helpful? 此页面是否有帮助?


You can also leave detailed feedback on GitHub.
您还可以在GitHub上留下详细的反馈。