Skip to content

Latest commit

 

History

History

docs

Welcome to LangChain.dart

LangChain.dart is a Dart port of Python's LangChain framework.

Attribution note: most of the docs are just an adaptation of the original Python LangChain docs.

LangChain is a framework for developing applications powered by language models. It enables applications that are:

  1. Context-aware: connect a language model to sources of context (prompt instructions, few shot examples, content to ground its response in, etc.).
  2. Reason: rely on a language model to reason (about how to answer based on provided context, what actions to take, etc.)

The main value prop of LangChain are:

  1. Components: composable tools and integrations for working with language models. Components are modular and easy-to-use.
  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.

The LangChain.dart framework is made up of several different packages:

LangChain.dart has a modular design where the core langchain package provides the LangChain API and each integration with a model provider, database, etc. is provided by a separate package.

Getting Started

Here’s how to install LangChain, set up your environment, and start building.

We recommend following our Quickstart guide to familiarize yourself with the framework by building your first LangChain application.

Note: These docs are for the LangChain Dart package. For documentation on LangChain Python click here, and for LangChain.js click here.

LangChain Expression Language (LCEL)

LCEL is a declarative way to compose chains. LCEL was designed from day 1 to support putting prototypes in production, with no code changes, from the simplest “prompt + LLM” chain to the most complex chains.

  • Overview: LCEL and its benefits
  • Interface: The standard interface for LCEL objects
  • Cookbook: Example code for accomplishing common tasks

Modules

LangChain.dart provides standard, extendable interfaces and integrations for the following modules:

LangChain.dart

Model I/O
Interface with language models.

Retrieval
Interface with application-specific data.

Agents
Let models choose which tools to use given high-level directives

Examples, ecosystem, and resources

Use cases

Walkthroughes and best-practices for common end-to-end use cases, like:

Guides

Best practices for developing with LangChain.

Ecosystem

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 and dependent repos.

API reference

Head to the reference section for full documentation of all classes and methods in the LangChain Dart package.

Developer's guide

Check out the developer's guide for guidelines on contributing and help getting your dev environment set up.

Community

Our community is full of prolific developers, creative builders, and fantastic teachers. Join us on GitHub or Discord to ask questions, share feedback, meet other developers building with LangChain.dart, and dream about the future of LLM’s.