← All recipes
Moderne licensed

Upgrade to LangChain 0.2

Recipe IDorg.openrewrite.python.migrate.langchain.UpgradeToLangChain02Artifactopenrewrite-migrate-python

Migrate to LangChain 0.2 by updating imports from langchain to langchain_community and provider-specific packages.

Composite recipepython0.2langchainmigrationProprietary

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe org.openrewrite.python.migrate.langchain.UpgradeToLangChain02

If the recipe isn’t available locally, install it with:

mod config recipes pip install openrewrite-migrate-python

Definition

This recipe runs the following recipes in order.