davidmigloz/langchain_dart
Build LLM-powered Dart/Flutter applications.
What it solves
LangChain.dart is an unofficial Dart port of the LangChain framework, designed to bring the power of Large Language Models (LLMs) to the Dart and Flutter ecosystem. It addresses the scarcity of libraries in these languages that simplify the complexities of building LLM-powered applications, such as chatbots, Q&A systems with RAG, and autonomous agents.
How it works
The project is organized into a modular system of packages that developers can import based on their needs:
- Model I/O: Provides a unified API to interact with multiple LLM providers (OpenAI, Google, Mistral, Ollama, etc.), along with tools for prompt templates and output parsing.
- Retrieval: Handles the loading, splitting, embedding, and storing of user data in vector stores to enable Retrieval-Augmented Generation (RAG).
- Agents: Allows the creation of "bots" that use LLMs to decide which tools (like web search or calculators) to use to complete a task.
- LangChain Expression Language (LCEL): A way to compose these different components together into complex chains.
Who it’s for
Developers building applications with Dart and Flutter who want to integrate LLMs and create advanced AI features without having to write low-level API calls for every provider.
Highlights
- Modular Design: Separate packages for core abstractions, high-level chains, community integrations, and specific provider SDKs.
- Wide Integration Support: Supports a vast array of providers including OpenAI, Google (Gemini/Vertex AI), Anthropic, Mistral, and Ollama.
- Vector Store Support: Integrations for Chroma, Pinecone, and Supabase.
- Unified API: Allows developers to switch between different LLM providers with minimal code changes.