Replace langchain legacy imports with langchain_classic
Recipe ID
org.openrewrite.python.migrate.langchain.ReplaceLangchainClassicImportsArtifactopenrewrite-migrate-pythonMigrate legacy chain, retriever, and indexing imports from langchain to langchain_classic. These were moved in LangChain v1.0.
Single recipepython1.0langchainmigrationProprietary
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.ReplaceLangchainClassicImportsIf the recipe isn’t available locally, install it with:
mod config recipes pip install openrewrite-migrate-python