In an effort to make langchain leaner and safer, we are moving select chains to langchain_experimental.
This migration has already started, but we are remaining backwards compatible until 7/28.
On that date, we will remove functionality from langchain.
Read more about the motivation and the progress here.
We are moving any experimental components of LangChain, or components with vulnerability issues, into langchain_experimental.
This guide covers how to migrate.
Previously:
pip install -U langchain
Now (only if you want to access things in experimental):
pip install -U langchain langchain_experimental
Previously:
from langchain.experimental import ...
Now:
from langchain_experimental import ...
Previously:
from langchain.chains import PALChain
Now:
from langchain_experimental.pal_chain import PALChain
Previously:
from langchain.chains import SQLDatabaseChain
Now:
from langchain_experimental.sql import SQLDatabaseChain
Alternatively, if you are just interested in using the query generation part of the SQL chain, you can check out this SQL question-answering tutorial
from langchain.chains import create_sql_query_chain
Note: this only applies if you want to load Python files as prompts. If you want to load json/yaml files, no change is needed.
Previously:
from langchain.prompts import load_prompt
Now:
from langchain_experimental.prompts import load_prompt