- Copy files from the repository in langchain-with-pydantic-v2 folder.
- Place folder in the project root.
- Enter:
chmod +x langchain-with-pydantic-v2/install.sh
. - Enter:
./langchain-with-pydantic-v2/install.sh
. - Start using langchain with pydantic-v2!
This repository contains source files of langchain and its dependencies using pydantic. According to https://pypi.org/project/pydantic/ pydantic-v2 contains pydantic-v1 in pydantic.v1 package. The .sh file replaces all lines "from pydantic" to "from pydantic.v1", builds and installs packages with pip.