Sunday, July 07, 2024

How to set specific version of dependency in poetry

I am here will set langchain-core==0.2.2 instead of 0.2.3 sent in toml file.

To set Poetry to use langchain-core==0.2.2, you can add it as a dependency in your pyproject.toml file. Here's how you can do it:

  1. Open your pyproject.toml file in your project directory.
  2. Locate the [tool.poetry.dependencies] section.
  3. Add the following line to specify the version of langchain-core you want to use: langchain-core = "==0.2.2"
  4. Save the pyproject.toml file.

After making this change, Poetry will use langchain-core==0.2.2 when you run poetry install or poetry update.

Note: Make sure you have Poetry installed on your system before running these commands. You can install Poetry by following the instructions on the official Poetry website.