Now that your package is implemented and tested, you can:
  1. Publish your package to PyPi
  2. Add documentation for your package to the LangChain monorepo

Publishing your package to PyPi

This guide assumes you have already implemented your package and written tests for it. If you haven’t done that yet, please refer to the implementation guide and the testing guide. Note that Poetry is not required to publish a package to PyPi, and we’re using it in this guide end-to-end for convenience. You are welcome to publish your package using any other method you prefer. First, make sure you have a PyPi account and have logged in with Poetry:
poetry config pypi-token.pypi <your-pypi-token>
Next, build your package:
poetry build
Finally, publish your package to PyPi:
poetry publish
Your package is now available on PyPi and can be installed with pip install langchain-parrot-link.

Adding documentation to the LangChain monorepo

To add documentation for your package to the LangChain monorepo, you will need to:
  1. Fork and clone the LangChain monorepo
  2. Make a provider page at docs/docs/integrations/providers/<your-package-name>.mdx
  3. Make component pages at docs/docs/integrations/<component-type>/<your-package-name>.mdx
  4. Register your package in libs/packages.yml
  5. Submit a PR with only these changes to the LangChain monorepo

Fork and clone the LangChain monorepo

First, fork the LangChain monorepo to your GitHub account. Next, clone the repository to your local machine:
git clone https://github.com/<your-username>/langchain.git
To make it easier to create the necessary documentation pages, you can use the langchain-cli to bootstrap them for you. First, install the latest version of the langchain-cli package:
pip install --upgrade langchain-cli
To see the available commands to bootstrap your documentation pages, run:
langchain-cli integration create-doc --help
Let’s bootstrap a provider page from the root of the monorepo:
langchain-cli integration create-doc \
    --component-type Provider \
    --destination-dir docs/docs/integrations/providers \
    --name parrot-link \
    --name-class ParrotLink
And a chat model component page:
langchain-cli integration create-doc \
    --component-type ChatModel \
    --destination-dir docs/docs/integrations/chat \
    --name parrot-link \
    --name-class ParrotLink
And a vector store component page:
langchain-cli integration create-doc \
    --component-type VectorStore \
    --destination-dir docs/docs/integrations/vectorstores \
    --name parrot-link \
    --name-class ParrotLink
These commands will create the following 3 files, which you should fill out with information about your package:
  • docs/docs/integrations/providers/parrot_link.ipynb
  • docs/docs/integrations/chat/parrot_link.ipynb
  • docs/docs/integrations/vectorstores/parrot_link.ipynb

Manually create your documentation pages (if you prefer)

If you prefer to create the documentation pages manually, you can create the same files listed above and fill them out with information about your package. You can view the templates that the CLI uses to create these files here.

Register your package in libs/packages.yml

Finally, add your package to the end of the libs/packages.yml file in the LangChain monorepo.
packages:
  - name: langchain-parrot-link
    repo: <your github handle>/<your repo>
    path: .
For path, you can use . if your package is in the root of your repository, or specify a subdirectory (e.g., libs/parrot-link) if it is in a subdirectory. If you followed the package bootstrapping guide, then your path is ..

Submit a PR with your changes

After you complete these steps, submit a PR to the LangChain monorepo with only these changes. If you have additional changes to request, submit them in a separate PR.