pip install <your-package>
,
which contain classes that are compatible with LangChain’s core interfaces.
This guide covers:
Option 1: langchain-cli (recommended)
langchain-cli
to create a new integration package
from a template, which can be edited to implement your LangChain components.langchain-cli
and poetry
:langchain-parrot-link
.
You can confirm that the name is available on PyPi by searching for it on the PyPi website.Next, create your new Python package with langchain-cli
, and navigate into the new directory with cd
:typing
or test
dependencies in a separate Poetry dependency group.Option 2: Poetry (manual)
langchain-parrot-link
.
You can confirm that the name is available on PyPi by searching for it on the PyPi website.Next, create your new Python package with Poetry, and navigate into the new directory with cd
:pyproject.toml
file:test
dependencies in a separate Poetry dependency group. If
you are not using Poetry, we recommend adding these in a way that won’t package them
with your published package, or just installing them separately when you run tests.langchain-tests
will provide the standard tests we will use later.
We recommended pinning these to the latest version: <latest_version>
with the latest version of langchain-tests
below.ChatParrotLink
chat model integration for LangChain. Here’s an example of what your project structure might look like:chat_models.py
and test_chat_models.py
. We will implement test_chat_models.py
later, following the standard tests guide.For chat_models.py
, paste the contents of the chat model implementation
above.langchain-core
.
Examples include chat models, vector stores, tools, embedding models, and retrievers.
Your integration package will typically implement a subclass of at least one of these
components. Expand the tabs below to see details on each.
langchain-cli
command: