Skip to main content




As of release 0.2.0, langchain is required to be integration-agnostic. This means that code in langchain should not by default instantiate any specific chat models, llms, embedding models, vectorstores etc; instead, the user will be required to specify those explicitly.

The following functions and classes require an explicit LLM to be passed as an argument:

  • langchain.agents.agent_toolkits.vectorstore.toolkit.VectorStoreToolkit
  • langchain.agents.agent_toolkits.vectorstore.toolkit.VectorStoreRouterToolkit
  • langchain.chains.openai_functions.get_openapi_chain
  • langchain.chains.router.MultiRetrievalQAChain.from_retrievers
  • langchain.indexes.VectorStoreIndexWrapper.query
  • langchain.indexes.VectorStoreIndexWrapper.query_with_sources
  • langchain.indexes.VectorStoreIndexWrapper.aquery_with_sources
  • langchain.chains.flare.FlareChain

The following classes now require passing an explicit Embedding model as an argument:

  • langchain.indexes.VectostoreIndexCreator

The following code has been removed:

  • langchain.natbot.NatBotChain.from_default removed in favor of the from_llm class method.


We have two main types of deprecations:

  1. Code that was moved from langchain into another package (e.g, langchain-community)

If you try to import it from langchain, the import will keep on working, but will raise a deprecation warning. The warning will provide a replacement import statement.

python -c "from langchain.document_loaders.markdown import UnstructuredMarkdownLoader"

LangChainDeprecationWarning: Importing UnstructuredMarkdownLoader from langchain.document_loaders is deprecated. Please replace deprecated imports:

>> from langchain.document_loaders import UnstructuredMarkdownLoader

with new imports of:

>> from langchain_community.document_loaders import UnstructuredMarkdownLoader

We will continue supporting the imports in langchain until release 0.4 as long as the relevant package where the code lives is installed. (e.g., as long as langchain_community is installed.)

However, we advise for users to not rely on these imports and instead migrate to the new imports. To help with this process, we’re releasing a migration script via the LangChain CLI. See further instructions in migration guide.

  1. Code that has better alternatives available and will eventually be removed, so there’s only a single way to do things. (e.g., predict_messages method in ChatModels has been deprecated in favor of invoke).

Many of these were marked for removal in 0.2. We have bumped the removal to 0.3.

0.1.0 (Jan 5, 2024)​


No deletions.


Deprecated classes and methods will be removed in 0.2.0

ChatVectorDBChainConversationalRetrievalChainMore general to all retrievers
create_ernie_fn_chaincreate_ernie_fn_runnableUse LCEL under the hood
created_structured_output_chaincreate_structured_output_runnableUse LCEL under the hood
NatBotChainNot used
create_openai_fn_chaincreate_openai_fn_runnableUse LCEL under the hood
create_structured_output_chaincreate_structured_output_runnableUse LCEL under the hood
load_query_constructor_chainload_query_constructor_runnableUse LCEL under the hood
VectorDBQARetrievalQAMore general to all retrievers
Sequential ChainLCELObviated by LCEL
SimpleSequentialChainLCELObviated by LCEL
TransformChainLCEL/RunnableLambdaObviated by LCEL
create_tagging_chaincreate_structured_output_runnableUse LCEL under the hood
ChatAgentcreate_react_agentUse LCEL builder over a class
ConversationalAgentcreate_react_agentUse LCEL builder over a class
ConversationalChatAgentcreate_json_chat_agentUse LCEL builder over a class
initialize_agentIndividual create agent methodsIndividual create agent methods are more clear
ZeroShotAgentcreate_react_agentUse LCEL builder over a class
OpenAIFunctionsAgentcreate_openai_functions_agentUse LCEL builder over a class
OpenAIMultiFunctionsAgentcreate_openai_tools_agentUse LCEL builder over a class
SelfAskWithSearchAgentcreate_self_ask_with_searchUse LCEL builder over a class
StructuredChatAgentcreate_structured_chat_agentUse LCEL builder over a class
XMLAgentcreate_xml_agentUse LCEL builder over a class

Was this page helpful?

You can also leave detailed feedback on GitHub.