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和助手。
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 onlangchain-core
.
合作伙伴包(例如langchain-openai
,langchain-anthropic
等):一些集成已经被进一步拆分成自己的轻量级包,只依赖于langchain-core
。
- Partner packages (e.g.
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应用程序。
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:
这些是最好的开始:
- Build a Simple LLM Application
构建一个简单LLM应用程序 - Build a Chatbot 构建一个聊天机器人
- Build an Agent 构建代理
- Introduction to LangGraph
LangGraph简介
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.
查看开发人员指南,了解有关贡献和帮助设置开发环境的指导方针。