Langchain is a framework for developing applications backed by language models (Llama 2, ChatGPT, Mistral etc.)
It gives the ability to connect the models to any source of context (shot examples, PDF files with content etc) and how to answer based on provided context, what action to take etc.
Its libraries mainly come in two languages i.e Python and JavaScript.
Pro Tip: LangChain also provides a chatGPT 3.5 powered chatBot which answers anything about LangChain's Python documentation! https://chat.langchain.com/
LangChain provides several products which simplifies the entire lifecycle of an application :
Installation:
LangChain installation is a piece of cake, run the following command according to your environment.
pip install langchain
conda install langchain -c conda-forge
Note:- This will install the bare minimum requirements of LangChain. You will need to install the prerequisites for individual integrations separately
From Source:
pip install -e .
LangChain community:
This package contains various 3rd party integrations. It's automatically installed by the Langchain and can be separately installed by using:
pip install langchain-community
LangChain core:
It contains the base abstraction that the rest of the langchain ecosystem uses.
pip install langchain-core
LangServe:
Deploy LangChain runnables as REST API.
pip install "langserve[all]"
For client code:
pip install "langserve[client]"
For Server code:
pip install "langserve[server]"
LangChain CLI:
LangChain CLI is useful for working with LangChain templates and other LangServe projects.
pip install langchain-cli
LangSmith SDK:
pip install langsmith