langchain 0.0.1-dev.5 copy "langchain: ^0.0.1-dev.5" to clipboard
langchain: ^0.0.1-dev.5 copied to clipboard

Build powerful LLM-based Dart/Flutter applications.

🦜️🔗 LangChain.dart #

Build powerful LLM-based Dart/Flutter applications.

🚧 Early Stage of Development 🚧 📢 Call for Collaborators 📢
Please note that this project is in a very early stage of development. We are still working on the initial version and there may be bugs and incomplete features. We are looking for collaborators to join the core group of maintainers.

What is LangChain.dart? #

LangChain.dart is a Dart port of LangChain.

Motivation #

Large Language Models (LLMs) have revolutionized Natural Language Processing (NLP), serving as essential components in a wide range of applications, such as question answering, summarization, translation, and text generation.

Notably, most libraries and tools designed to support LLMs have been predominantly developed for the Python and JavaScript ecosystems. As a result, the number of Python and JavaScript applications leveraging LLMs has grown exponentially.

In contrast, the Dart / Flutter ecosystem has not experienced similar growth, which can likely be attributed to the scarcity of Dart and Flutter libraries that streamline the complexities associated with working with LLMs.

Flutter provides a unique technology that enables the rapid development of high-quality, natively compiled applications for mobile, web, desktop, and embedded devices from a single codebase, making it an ideal choice for building these types of applications.

LangChain.dart aims to fill this gap by abstracting the complexities of working with LLMs in Dart, enabling developers to harness the combined potential of both Flutter and LLMs effectively.

Packages #

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

Package Version Description Models Doc. loaders Memory Tools
langchain langchain The core package that provides the LangChain API. 🟢 🟢 🟢 🟢
langchain_amazon langchain_amazon Integration with Amazon.
langchain_anthropic langchain_anthropic Integration with Anthropic.
langchain_chroma langchain_chroma Integration with Chroma.
langchain_cohere langchain_cohere Integration with Cohere.
langchain_google langchain_google Integration with Google.
langchain_huggingface langchain_huggingface Integration with Hugging Face.
langchain_microsoft langchain_microsoft Integration with Microsoft.
langchain_openai langchain_openai Integration with OpenAI.
langchain_pinecone langchain_pinecone Integration with Pinecone.
langchain_supabase langchain_supabase Integration with Supabase.
langchain_weaviate langchain_weaviate Integration with Weaviate.
langchain_wikipedia langchain_wikipedia Integration with Wikipedia.
langchain_wolfram langchain_wolfram Integration with Wolfram Research.
langchain_zapier langchain_zapier Integration with Zapier.

Getting started #

To start using LangChain.dart, add langchain as a dependency to your pubspec.yaml file. Also, include the dependencies for the specific integrations you want to use (e.g.langchain_openai):

dependencies:
  langchain: { version }
  langchain_openai: { version }

The most basic building block of LangChain is calling an LLM on some input:

final llm = OpenAI(apiKey: openaiApiKey, temperature: 0.9);
final result = await llm('Hello world!');

Docs #

You can find the full documentation at langchaindart.com.

  • Getting started (installation, setting up the environment, simple examples)
  • How-To examples (demos, integrations, helper functions)
  • Reference (full API docs)
  • Resources (high-level explanation of core concepts)

Contribute #

TODO

License #

LangChain.dart is licensed under the MIT License.