Skip to main content

langchain-hs Documentation

Lanchain-hs is the Haskell implementation of LangChain.

Welcome to langchain-hs

Langchain-hs brings the power of LangChain to Haskell, enabling type-safe LLM application development with:

  • Composable pipelines using Haskell's type system
  • Closely following with Offical LangChain concepts
  • Performance through functional programming patterns
  • Support for Ollama, OpenAI and custom LLM integrations

Getting Started

Check out the Quickstart guide to get started with langchain-hs.

Components

This documenation provides an overview of the core components of langchain-hs. Each component is designed to be modular, composable and interchangeble, allowing you to build complex applications with ease.

Langchain-hs is built around the core concepts of LangChain; You will find documentation for each components including:

  • LLMs: Language models that can be used for various tasks.
  • Document Loader: Components for loading and processing documents from various sources.
  • Embedding: Components for generating vector representations of text.
  • Memory: Mechanisms for storing and retrieving chat history and other contextual information.
  • Output Parser: Components for parsing and processing the output of LLMs.
  • Callback: Mechanisms for monitoring the execution of LLMs.
  • Prompt: Templates for generating input for LLMs.
  • Vector Store: Mechanism for storing and retrieving document embeddings.
  • Retriever: Generic interface for retrieving documents from a vector store.
  • Text Splitter: Components for splitting text into smaller chunks for processing.
  • Tool: External functions or APIs that can be called by agents to perform specific tasks.
  • Agent: Components that can make decisions based on the output of LLMs and other components.
  • Chain: Composable sequences of operations that can be executed in a specific order.

API Reference

Please refer to the Hackage documentation for the API reference.

Additional support

Feel free to raise issues or ask questions in the GitHub repository. We welcome contributions and feedback from the community. You can also join the Langchain-hs Discord for discussions and support.

Current Status : Actively developed with expanding feature set. Some functionalities maybe a bit unstable. Please report any issues you encounter.