ForkReka AIReka AIpublished Aug 30, 2024seen 5d

reka-ai/langchain

forked from langchain-ai/langchain

Open original ↗

Captured source

source ↗
published Aug 30, 2024seen 5dcaptured 11hhttp 200method plain

reka-ai/langchain

Description: 🦜🔗 Build context-aware reasoning applications

Language: Jupyter Notebook

License: MIT

Stars: 1

Forks: 0

Open issues: 0

Created: 2024-08-30T23:21:24Z

Pushed: 2024-10-10T23:46:04Z

Default branch: master

Fork: yes

Parent repository: langchain-ai/langchain

Archived: no

README:

🦜️🔗 LangChain

⚡ Build context-aware reasoning applications ⚡

![CI](https://github.com/langchain-ai/langchain/actions/workflows/check_diffs.yml) ![Open in GitHub Codespaces](https://codespaces.new/langchain-ai/langchain)

Looking for the JS/TS library? Check out LangChain.js.

To help you ship LangChain apps to production faster, check out LangSmith. LangSmith is a unified developer platform for building, testing, and monitoring LLM applications. Fill out this form to speak with our sales team.

Quick Install

With pip:

pip install langchain

With conda:

conda install langchain -c conda-forge

🤔 What is LangChain?

LangChain is a framework for developing applications powered by large language models (LLMs).

For these applications, LangChain simplifies the entire application lifecycle:

Use LangGraph to build stateful agents with first-class streaming and human-in-the-loop support.

  • Productionization: Inspect, monitor, and evaluate your apps with LangSmith so that you can constantly optimize and deploy with confidence.
  • Deployment: Turn your LangGraph applications into production-ready APIs and Assistants with LangGraph Cloud.

Open-source libraries

  • `langchain-core`: Base abstractions and LangChain Expression Language.
  • `langchain-community`: Third party integrations.
  • Some integrations have been further split into partner packages that only rely on `langchain-core`. Examples include `langchain_openai` and `langchain_anthropic`.
  • `langchain`: Chains, agents, and retrieval strategies that make up an application's cognitive architecture.
  • [`LangGraph`](https://langchain-ai.github.io/langgraph/): A library for building 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. To learn more about LangGraph, check out our first LangChain Academy course, *Introduction to LangGraph*, available here.

Productionization:

  • [LangSmith](https://docs.smith.langchain.com/): A developer platform that lets you debug, test, evaluate, and monitor chains built on any LLM framework and seamlessly integrates with LangChain.

Deployment:

  • [LangGraph Cloud](https://langchain-ai.github.io/langgraph/cloud/): Turn your LangGraph applications into production-ready APIs and Assistants.

![Diagram outlining the hierarchical organization of the LangChain framework, displaying the interconnected parts across multiple layers.](docs/static/svg/langchain_stack_062024.svg "LangChain Architecture Overview")

🧱 What can you build with LangChain?

❓ Question answering with RAG

🧱 Extracting structured output

🤖 Chatbots

And much more! Head to the Tutorials section of the docs for more.

🚀 How does LangChain help?

The main value props of the LangChain libraries are:

1. Components: composable building blocks, tools and integrations for working with language models. Components are modular and easy-to-use, whether you are using the rest of the LangChain framework or not 2. Off-the-shelf chains: built-in assemblages of components for accomplishing higher-level tasks

Off-the-shelf chains make it easy to get started. Components make it easy to customize existing chains and build new ones.

LangChain Expression Language (LCEL)

LCEL is a key part of LangChain, allowing you to build and organize chains of processes in a straightforward, declarative manner. It was designed to support taking prototypes directly into production without needing to alter any code. This means you can use LCEL to set up everything from basic "prompt + LLM" setups to intricate, multi-step workflows.

  • [Overview](https://python.langchain.com/docs/concepts/#langchain-expression-language-lcel): LCEL and its benefits
  • [Interface](https://python.langchain.com/docs/concepts/#runnable-interface): The standard Runnable interface for LCEL objects
  • [Primitives](https://python.langchain.com/docs/how_to/#langchain-expression-language-lcel): More on the primitives LCEL includes
  • [Cheatsheet](https://python.langchain.com/docs/how_to/lcel_cheatsheet/): Quick overview of the most common usage patterns

Components

Components fall into the following modules:

📃 Model I/O

This includes prompt management, prompt optimization, a generic interface for chat models and LLMs, and common utilities for working…

Excerpt shown — open the source for the full document.

Notability

notability 1.0/10

routine fork, minimal traction