diff --git a/libs/cli/langchain_cli/integration_template/docs/chat.ipynb b/libs/cli/langchain_cli/integration_template/docs/chat.ipynb
index 2b838e3b090..4410789a8e9 100644
--- a/libs/cli/langchain_cli/integration_template/docs/chat.ipynb
+++ b/libs/cli/langchain_cli/integration_template/docs/chat.ipynb
@@ -21,7 +21,7 @@
"\n",
"This will help you getting started with __ModuleName__ [chat models](/docs/concepts/#chat-models). For detailed documentation of all Chat__ModuleName__ features and configurations head to the [API reference](https://api.python.langchain.com/en/latest/chat_models/__module_name__.chat_models.Chat__ModuleName__.html).\n",
"\n",
- "- TODO: Add any other relevant links, like information about models, prices, context windows, etc. See https://python.langchain.com/v0.2/docs/integrations/chat/openai/ for an example.\n",
+ "- TODO: Add any other relevant links, like information about models, prices, context windows, etc. See https://python.langchain.com/docs/integrations/chat/openai/ for an example.\n",
"\n",
"## Overview\n",
"### Integration details\n",
@@ -30,7 +30,7 @@
"- TODO: Remove JS support link if not relevant, otherwise ensure link is correct.\n",
"- TODO: Make sure API reference links are correct.\n",
"\n",
- "| Class | Package | Local | Serializable | [JS support](https://js.langchain.com/v0.2/docs/integrations/chat/__package_name_short_snake__) | Package downloads | Package latest |\n",
+ "| Class | Package | Local | Serializable | [JS support](https://js.langchain.com/docs/integrations/chat/__package_name_short_snake__) | Package downloads | Package latest |\n",
"| :--- | :--- | :---: | :---: | :---: | :---: | :---: |\n",
"| [Chat__ModuleName__](https://api.python.langchain.com/en/latest/chat_models/__module_name__.chat_models.Chat__ModuleName__.html) | [__package_name__](https://api.python.langchain.com/en/latest/__package_name_short_snake___api_reference.html) | ✅/❌ | beta/❌ | ✅/❌ |  |  |\n",
"\n",
diff --git a/libs/cli/langchain_cli/integration_template/docs/document_loaders.ipynb b/libs/cli/langchain_cli/integration_template/docs/document_loaders.ipynb
index 3d80f7b75e1..e457102b5cf 100644
--- a/libs/cli/langchain_cli/integration_template/docs/document_loaders.ipynb
+++ b/libs/cli/langchain_cli/integration_template/docs/document_loaders.ipynb
@@ -17,7 +17,7 @@
"\n",
"- TODO: Make sure API reference link is correct.\n",
"\n",
- "This notebook provides a quick overview for getting started with __ModuleName__ [document loader](https://python.langchain.com/v0.2/docs/concepts/#document-loaders). For detailed documentation of all __ModuleName__Loader features and configurations head to the [API reference](https://python.langchain.com/v0.2/api_reference/community/document_loaders/langchain_community.document_loaders.__module_name___loader.__ModuleName__Loader.html).\n",
+ "This notebook provides a quick overview for getting started with __ModuleName__ [document loader](https://python.langchain.com/docs/concepts/#document-loaders). For detailed documentation of all __ModuleName__Loader features and configurations head to the [API reference](https://python.langchain.com/v0.2/api_reference/community/document_loaders/langchain_community.document_loaders.__module_name___loader.__ModuleName__Loader.html).\n",
"\n",
"- TODO: Add any other relevant links, like information about underlying API, etc.\n",
"\n",
@@ -28,7 +28,7 @@
"- TODO: Remove JS support link if not relevant, otherwise ensure link is correct.\n",
"- TODO: Make sure API reference links are correct.\n",
"\n",
- "| Class | Package | Local | Serializable | [JS support](https://js.langchain.com/v0.2/docs/integrations/document_loaders/web_loaders/__module_name___loader)|\n",
+ "| Class | Package | Local | Serializable | [JS support](https://js.langchain.com/docs/integrations/document_loaders/web_loaders/__module_name___loader)|\n",
"| :--- | :--- | :---: | :---: | :---: |\n",
"| [__ModuleName__Loader](https://python.langchain.com/v0.2/api_reference/community/document_loaders/langchain_community.document_loaders.__module_name__loader.__ModuleName__Loader.html) | [langchain_community](https://api.python.langchain.com/en/latest/community_api_reference.html) | ✅/❌ | beta/❌ | ✅/❌ | \n",
"### Loader features\n",
diff --git a/libs/cli/langchain_cli/integration_template/docs/llms.ipynb b/libs/cli/langchain_cli/integration_template/docs/llms.ipynb
index 98be1ccb7f8..6af4fb79416 100644
--- a/libs/cli/langchain_cli/integration_template/docs/llms.ipynb
+++ b/libs/cli/langchain_cli/integration_template/docs/llms.ipynb
@@ -28,7 +28,7 @@
"- TODO: Remove JS support link if not relevant, otherwise ensure link is correct.\n",
"- TODO: Make sure API reference links are correct.\n",
"\n",
- "| Class | Package | Local | Serializable | [JS support](https://js.langchain.com/v0.2/docs/integrations/llms/__package_name_short_snake__) | Package downloads | Package latest |\n",
+ "| Class | Package | Local | Serializable | [JS support](https://js.langchain.com/docs/integrations/llms/__package_name_short_snake__) | Package downloads | Package latest |\n",
"| :--- | :--- | :---: | :---: | :---: | :---: | :---: |\n",
"| [__ModuleName__LLM](https://api.python.langchain.com/en/latest/llms/__module_name__.llms.__ModuleName__LLM.html) | [__package_name__](https://api.python.langchain.com/en/latest/__package_name_short_snake___api_reference.html) | ✅/❌ | beta/❌ | ✅/❌ |  |  |\n",
"\n",
diff --git a/libs/cli/langchain_cli/integration_template/docs/stores.ipynb b/libs/cli/langchain_cli/integration_template/docs/stores.ipynb
index 78f586d8dfa..7f5a48aa1a6 100644
--- a/libs/cli/langchain_cli/integration_template/docs/stores.ipynb
+++ b/libs/cli/langchain_cli/integration_template/docs/stores.ipynb
@@ -23,7 +23,7 @@
"\n",
"This will help you get started with __ModuleName__ [key-value stores](/docs/concepts/#key-value-stores). For detailed documentation of all __ModuleName__ByteStore features and configurations head to the [API reference](https://python.langchain.com/v0.2/api_reference/core/stores/langchain_core.stores.__module_name__ByteStore.html).\n",
"\n",
- "- TODO: Add any other relevant links, like information about models, prices, context windows, etc. See https://python.langchain.com/v0.2/docs/integrations/stores/in_memory/ for an example.\n",
+ "- TODO: Add any other relevant links, like information about models, prices, context windows, etc. See https://python.langchain.com/docs/integrations/stores/in_memory/ for an example.\n",
"\n",
"## Overview\n",
"\n",
@@ -35,7 +35,7 @@
"- TODO: Remove JS support link if not relevant, otherwise ensure link is correct.\n",
"- TODO: Make sure API reference links are correct.\n",
"\n",
- "| Class | Package | Local | [JS support](https://js.langchain.com/v0.2/docs/integrations/stores/_package_name_) | Package downloads | Package latest |\n",
+ "| Class | Package | Local | [JS support](https://js.langchain.com/docs/integrations/stores/_package_name_) | Package downloads | Package latest |\n",
"| :--- | :--- | :---: | :---: | :---: | :---: |\n",
"| [__ModuleName__ByteStore](https://api.python.langchain.com/en/latest/stores/__module_name__.stores.__ModuleName__ByteStore.html) | [__package_name__](https://api.python.langchain.com/en/latest/__package_name_short_snake___api_reference.html) | ✅/❌ | ✅/❌ |  |  |\n",
"\n",
diff --git a/libs/cli/langchain_cli/integration_template/docs/tools.ipynb b/libs/cli/langchain_cli/integration_template/docs/tools.ipynb
index 047d19ff2a6..65929d292ff 100644
--- a/libs/cli/langchain_cli/integration_template/docs/tools.ipynb
+++ b/libs/cli/langchain_cli/integration_template/docs/tools.ipynb
@@ -29,7 +29,7 @@
"\n",
"- TODO: Make sure links and features are correct\n",
"\n",
- "| Class | Package | Serializable | [JS support](https://js.langchain.com/v0.2/docs/integrations/tools/__module_name__) | Package latest |\n",
+ "| Class | Package | Serializable | [JS support](https://js.langchain.com/docs/integrations/tools/__module_name__) | Package latest |\n",
"| :--- | :--- | :---: | :---: | :---: |\n",
"| [__ModuleName__](https://python.langchain.com/v0.2/api_reference/community/tools/langchain_community.tools.__module_name__.tool.__ModuleName__.html) | [langchain-community](https://api.python.langchain.com/en/latest/community_api_reference.html) | beta/❌ | ✅/❌ |  |\n",
"\n",
diff --git a/libs/cli/langchain_cli/integration_template/docs/vectorstores.ipynb b/libs/cli/langchain_cli/integration_template/docs/vectorstores.ipynb
index f259710b093..c90550b48d6 100644
--- a/libs/cli/langchain_cli/integration_template/docs/vectorstores.ipynb
+++ b/libs/cli/langchain_cli/integration_template/docs/vectorstores.ipynb
@@ -292,9 +292,9 @@
"\n",
"For guides on how to use this vector store for retrieval-augmented generation (RAG), see the following sections:\n",
"\n",
- "- [Tutorials: working with external knowledge](https://python.langchain.com/v0.2/docs/tutorials/#working-with-external-knowledge)\n",
- "- [How-to: Question and answer with RAG](https://python.langchain.com/v0.2/docs/how_to/#qa-with-rag)\n",
- "- [Retrieval conceptual docs](https://python.langchain.com/v0.2/docs/concepts/#retrieval)"
+ "- [Tutorials: working with external knowledge](https://python.langchain.com/docs/tutorials/#working-with-external-knowledge)\n",
+ "- [How-to: Question and answer with RAG](https://python.langchain.com/docs/how_to/#qa-with-rag)\n",
+ "- [Retrieval conceptual docs](https://python.langchain.com/docs/concepts/#retrieval)"
]
},
{
diff --git a/libs/community/langchain_community/agent_toolkits/github/toolkit.py b/libs/community/langchain_community/agent_toolkits/github/toolkit.py
index 963c3727aa8..b98785bbef8 100644
--- a/libs/community/langchain_community/agent_toolkits/github/toolkit.py
+++ b/libs/community/langchain_community/agent_toolkits/github/toolkit.py
@@ -166,7 +166,7 @@ class GitHubToolkit(BaseToolkit):
Setup:
See detailed installation instructions here:
- https://python.langchain.com/v0.2/docs/integrations/tools/github/#installation
+ https://python.langchain.com/docs/integrations/tools/github/#installation
You will need to install ``pygithub`` and set the following environment
variables:
diff --git a/libs/community/langchain_community/agent_toolkits/gmail/toolkit.py b/libs/community/langchain_community/agent_toolkits/gmail/toolkit.py
index 815bf89c2a8..d9dea07de1a 100644
--- a/libs/community/langchain_community/agent_toolkits/gmail/toolkit.py
+++ b/libs/community/langchain_community/agent_toolkits/gmail/toolkit.py
@@ -41,7 +41,7 @@ class GmailToolkit(BaseToolkit):
Setup:
You will need a Google credentials.json file to use this toolkit.
- See instructions here: https://python.langchain.com/v0.2/docs/integrations/tools/gmail/#setup
+ See instructions here: https://python.langchain.com/docs/integrations/tools/gmail/#setup
Key init args:
api_resource: Optional. The Google API resource. Default is None.
diff --git a/libs/community/langchain_community/document_loaders/recursive_url_loader.py b/libs/community/langchain_community/document_loaders/recursive_url_loader.py
index 5cd09e90b96..d2043444747 100644
--- a/libs/community/langchain_community/document_loaders/recursive_url_loader.py
+++ b/libs/community/langchain_community/document_loaders/recursive_url_loader.py
@@ -79,7 +79,7 @@ class RecursiveUrlLoader(BaseLoader):
GET request to an endpoint on Bob's site. Both sites are hosted on the
same host, so such a request would not be prevented by default.
- See https://python.langchain.com/v0.2/docs/security/
+ See https://python.langchain.com/docs/security/
Setup:
diff --git a/libs/community/langchain_community/graph_vectorstores/extractors/html_link_extractor.py b/libs/community/langchain_community/graph_vectorstores/extractors/html_link_extractor.py
index a3073450fc7..8aee9767d4a 100644
--- a/libs/community/langchain_community/graph_vectorstores/extractors/html_link_extractor.py
+++ b/libs/community/langchain_community/graph_vectorstores/extractors/html_link_extractor.py
@@ -115,7 +115,7 @@ class HtmlLinkExtractor(LinkExtractor[HtmlInput]):
loader = AsyncHtmlLoader(
[
- "https://python.langchain.com/v0.2/docs/integrations/providers/astradb/",
+ "https://python.langchain.com/docs/integrations/providers/astradb/",
"https://docs.datastax.com/en/astra/home/astra.html",
]
)
@@ -132,11 +132,11 @@ class HtmlLinkExtractor(LinkExtractor[HtmlInput]):
.. code-block:: output
- [Link(kind='hyperlink', direction='out', tag='https://python.langchain.com/v0.2/docs/integrations/providers/spreedly/'),
- Link(kind='hyperlink', direction='out', tag='https://python.langchain.com/v0.2/docs/integrations/providers/nvidia/'),
- Link(kind='hyperlink', direction='out', tag='https://python.langchain.com/v0.2/docs/integrations/providers/ray_serve/'),
- Link(kind='hyperlink', direction='out', tag='https://python.langchain.com/v0.2/docs/integrations/providers/bageldb/'),
- Link(kind='hyperlink', direction='out', tag='https://python.langchain.com/v0.2/docs/introduction/')]
+ [Link(kind='hyperlink', direction='out', tag='https://python.langchain.com/docs/integrations/providers/spreedly/'),
+ Link(kind='hyperlink', direction='out', tag='https://python.langchain.com/docs/integrations/providers/nvidia/'),
+ Link(kind='hyperlink', direction='out', tag='https://python.langchain.com/docs/integrations/providers/ray_serve/'),
+ Link(kind='hyperlink', direction='out', tag='https://python.langchain.com/docs/integrations/providers/bageldb/'),
+ Link(kind='hyperlink', direction='out', tag='https://python.langchain.com/docs/introduction/')]
Using as_document_extractor()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -152,7 +152,7 @@ class HtmlLinkExtractor(LinkExtractor[HtmlInput]):
loader = AsyncHtmlLoader(
[
- "https://python.langchain.com/v0.2/docs/integrations/providers/astradb/",
+ "https://python.langchain.com/docs/integrations/providers/astradb/",
"https://docs.datastax.com/en/astra/home/astra.html",
]
)
@@ -167,11 +167,11 @@ class HtmlLinkExtractor(LinkExtractor[HtmlInput]):
.. code-block:: output
- [Link(kind='hyperlink', direction='out', tag='https://python.langchain.com/v0.2/docs/integrations/providers/spreedly/'),
- Link(kind='hyperlink', direction='out', tag='https://python.langchain.com/v0.2/docs/integrations/providers/nvidia/'),
- Link(kind='hyperlink', direction='out', tag='https://python.langchain.com/v0.2/docs/integrations/providers/ray_serve/'),
- Link(kind='hyperlink', direction='out', tag='https://python.langchain.com/v0.2/docs/integrations/providers/bageldb/'),
- Link(kind='hyperlink', direction='out', tag='https://python.langchain.com/v0.2/docs/introduction/')]
+ [Link(kind='hyperlink', direction='out', tag='https://python.langchain.com/docs/integrations/providers/spreedly/'),
+ Link(kind='hyperlink', direction='out', tag='https://python.langchain.com/docs/integrations/providers/nvidia/'),
+ Link(kind='hyperlink', direction='out', tag='https://python.langchain.com/docs/integrations/providers/ray_serve/'),
+ Link(kind='hyperlink', direction='out', tag='https://python.langchain.com/docs/integrations/providers/bageldb/'),
+ Link(kind='hyperlink', direction='out', tag='https://python.langchain.com/docs/introduction/')]
Using LinkExtractorTransformer
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -188,7 +188,7 @@ class HtmlLinkExtractor(LinkExtractor[HtmlInput]):
loader = AsyncHtmlLoader(
[
- "https://python.langchain.com/v0.2/docs/integrations/providers/astradb/",
+ "https://python.langchain.com/docs/integrations/providers/astradb/",
"https://docs.datastax.com/en/astra/home/astra.html",
]
)
@@ -201,11 +201,11 @@ class HtmlLinkExtractor(LinkExtractor[HtmlInput]):
.. code-block:: output
- [Link(kind='hyperlink', direction='out', tag='https://python.langchain.com/v0.2/docs/integrations/providers/spreedly/'),
- Link(kind='hyperlink', direction='out', tag='https://python.langchain.com/v0.2/docs/integrations/providers/nvidia/'),
- Link(kind='hyperlink', direction='out', tag='https://python.langchain.com/v0.2/docs/integrations/providers/ray_serve/'),
- Link(kind='hyperlink', direction='out', tag='https://python.langchain.com/v0.2/docs/integrations/providers/bageldb/'),
- Link(kind='hyperlink', direction='out', tag='https://python.langchain.com/v0.2/docs/introduction/')]
+ [Link(kind='hyperlink', direction='out', tag='https://python.langchain.com/docs/integrations/providers/spreedly/'),
+ Link(kind='hyperlink', direction='out', tag='https://python.langchain.com/docs/integrations/providers/nvidia/'),
+ Link(kind='hyperlink', direction='out', tag='https://python.langchain.com/docs/integrations/providers/ray_serve/'),
+ Link(kind='hyperlink', direction='out', tag='https://python.langchain.com/docs/integrations/providers/bageldb/'),
+ Link(kind='hyperlink', direction='out', tag='https://python.langchain.com/docs/introduction/')]
We can check that there is a link from the first document to the second::
@@ -225,7 +225,7 @@ class HtmlLinkExtractor(LinkExtractor[HtmlInput]):
.. code-block:: output
- Found link from https://python.langchain.com/v0.2/docs/integrations/providers/astradb/ to https://docs.datastax.com/en/astra/home/astra.html.
+ Found link from https://python.langchain.com/docs/integrations/providers/astradb/ to https://docs.datastax.com/en/astra/home/astra.html.
The documents with URL links can then be added to a :class:`~langchain_community.graph_vectorstores.base.GraphVectorStore`::
diff --git a/libs/community/langchain_community/retrievers/azure_ai_search.py b/libs/community/langchain_community/retrievers/azure_ai_search.py
index beb0dc05972..01549ff3bd0 100644
--- a/libs/community/langchain_community/retrievers/azure_ai_search.py
+++ b/libs/community/langchain_community/retrievers/azure_ai_search.py
@@ -22,7 +22,7 @@ class AzureAISearchRetriever(BaseRetriever):
"""`Azure AI Search` service retriever.
Setup:
- See here for more detail: https://python.langchain.com/v0.2/docs/integrations/retrievers/azure_ai_search/
+ See here for more detail: https://python.langchain.com/docs/integrations/retrievers/azure_ai_search/
We will need to install the below dependencies and set the required
environment variables:
diff --git a/libs/community/langchain_community/retrievers/milvus.py b/libs/community/langchain_community/retrievers/milvus.py
index 23d8890341a..1739dd83ecb 100644
--- a/libs/community/langchain_community/retrievers/milvus.py
+++ b/libs/community/langchain_community/retrievers/milvus.py
@@ -17,7 +17,7 @@ from langchain_community.vectorstores.milvus import Milvus
class MilvusRetriever(BaseRetriever):
"""Milvus API retriever.
- See detailed instructions here: https://python.langchain.com/v0.2/docs/integrations/retrievers/milvus_hybrid_search/
+ See detailed instructions here: https://python.langchain.com/docs/integrations/retrievers/milvus_hybrid_search/
Setup:
Install ``langchain-milvus`` and other dependencies:
diff --git a/libs/community/langchain_community/retrievers/qdrant_sparse_vector_retriever.py b/libs/community/langchain_community/retrievers/qdrant_sparse_vector_retriever.py
index 404081d5265..1b64c3467ff 100644
--- a/libs/community/langchain_community/retrievers/qdrant_sparse_vector_retriever.py
+++ b/libs/community/langchain_community/retrievers/qdrant_sparse_vector_retriever.py
@@ -29,7 +29,7 @@ from langchain_community.vectorstores.qdrant import Qdrant, QdrantException
"Qdrant vector store now supports sparse retrievals natively. "
"Use langchain_qdrant.QdrantVectorStore#as_retriever() instead. "
"Reference: "
- "https://python.langchain.com/v0.2/docs/integrations/vectorstores/qdrant/#sparse-vector-search"
+ "https://python.langchain.com/docs/integrations/vectorstores/qdrant/#sparse-vector-search"
),
removal="0.5.0",
)
diff --git a/libs/core/langchain_core/agents.py b/libs/core/langchain_core/agents.py
index 6e8cdc975eb..e49a19af2ae 100644
--- a/libs/core/langchain_core/agents.py
+++ b/libs/core/langchain_core/agents.py
@@ -8,7 +8,7 @@
Please see the migration guide for information on how to migrate existing
agents to modern langgraph agents:
- https://python.langchain.com/v0.2/docs/how_to/migrate_agent/
+ https://python.langchain.com/docs/how_to/migrate_agent/
Agents use language models to choose a sequence of actions to take.
diff --git a/libs/core/langchain_core/language_models/__init__.py b/libs/core/langchain_core/language_models/__init__.py
index f6a074fb202..2b3c6b40ef8 100644
--- a/libs/core/langchain_core/language_models/__init__.py
+++ b/libs/core/langchain_core/language_models/__init__.py
@@ -19,7 +19,7 @@ information on how to implement a custom chat model.
To implement a custom Chat Model, inherit from `BaseChatModel`. See
the following guide for more information on how to implement a custom Chat Model:
-https://python.langchain.com/v0.2/docs/how_to/custom_chat_model/
+https://python.langchain.com/docs/how_to/custom_chat_model/
**LLMs**
@@ -34,7 +34,7 @@ string under the hood before being passed to the underlying model.
To implement a custom LLM, inherit from `BaseLLM` or `LLM`.
Please see the following guide for more information on how to implement a custom LLM:
-https://python.langchain.com/v0.2/docs/how_to/custom_llm/
+https://python.langchain.com/docs/how_to/custom_llm/
""" # noqa: E501
diff --git a/libs/core/langchain_core/language_models/chat_models.py b/libs/core/langchain_core/language_models/chat_models.py
index 00d2a054ca5..05af1f9ac60 100644
--- a/libs/core/langchain_core/language_models/chat_models.py
+++ b/libs/core/langchain_core/language_models/chat_models.py
@@ -189,7 +189,7 @@ class BaseChatModel(BaseLanguageModel[BaseMessage], ABC):
+----------------------------------+--------------------------------------------------------------------+-------------------+
Follow the guide for more information on how to implement a custom Chat Model:
- [Guide](https://python.langchain.com/v0.2/docs/how_to/custom_chat_model/).
+ [Guide](https://python.langchain.com/docs/how_to/custom_chat_model/).
""" # noqa: E501
@@ -1103,7 +1103,9 @@ class BaseChatModel(BaseLanguageModel[BaseMessage], ABC):
def bind_tools(
self,
- tools: Sequence[Union[typing.Dict[str, Any], type, Callable, BaseTool]], # noqa: UP006
+ tools: Sequence[
+ Union[typing.Dict[str, Any], type, Callable, BaseTool] # noqa: UP006
+ ],
**kwargs: Any,
) -> Runnable[LanguageModelInput, BaseMessage]:
raise NotImplementedError()
diff --git a/libs/core/langchain_core/language_models/llms.py b/libs/core/langchain_core/language_models/llms.py
index f4ba7791eaf..44f7afd60ff 100644
--- a/libs/core/langchain_core/language_models/llms.py
+++ b/libs/core/langchain_core/language_models/llms.py
@@ -1417,7 +1417,7 @@ class LLM(BaseLLM):
Please see the following guide for more information on how to
implement a custom LLM:
- https://python.langchain.com/v0.2/docs/how_to/custom_llm/
+ https://python.langchain.com/docs/how_to/custom_llm/
"""
@abstractmethod
diff --git a/libs/langchain/langchain/_api/module_import.py b/libs/langchain/langchain/_api/module_import.py
index 993432dc4cc..a1aaa7e85d6 100644
--- a/libs/langchain/langchain/_api/module_import.py
+++ b/libs/langchain/langchain/_api/module_import.py
@@ -101,7 +101,7 @@ def create_importer(
f">> from {new_module} import {name}\n"
"You can use the langchain cli to **automatically** "
"upgrade many imports. Please see documentation here "
- ""
+ ""
),
)
return result
@@ -133,7 +133,7 @@ def create_importer(
f">> from {fallback_module} import {name}\n"
"You can use the langchain cli to **automatically** "
"upgrade many imports. Please see documentation here "
- ""
+ ""
),
)
return result
diff --git a/libs/langchain/langchain/agents/agent_toolkits/vectorstore/base.py b/libs/langchain/langchain/agents/agent_toolkits/vectorstore/base.py
index a9b7fdc4528..eb8548cc6e8 100644
--- a/libs/langchain/langchain/agents/agent_toolkits/vectorstore/base.py
+++ b/libs/langchain/langchain/agents/agent_toolkits/vectorstore/base.py
@@ -23,7 +23,7 @@ from langchain.chains.llm import LLMChain
"See API reference for this function for a replacement implementation: "
"https://api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.vectorstore.base.create_vectorstore_agent.html " # noqa: E501
"Read more here on how to create agents that query vector stores: "
- "https://python.langchain.com/v0.2/docs/how_to/qa_chat_history_how_to/#agents"
+ "https://python.langchain.com/docs/how_to/qa_chat_history_how_to/#agents"
),
)
def create_vectorstore_agent(
@@ -112,7 +112,7 @@ def create_vectorstore_agent(
"See API reference for this function for a replacement implementation: "
"https://api.python.langchain.com/en/latest/agents/langchain.agents.agent_toolkits.vectorstore.base.create_vectorstore_router_agent.html " # noqa: E501
"Read more here on how to create agents that query vector stores: "
- "https://python.langchain.com/v0.2/docs/how_to/qa_chat_history_how_to/#agents"
+ "https://python.langchain.com/docs/how_to/qa_chat_history_how_to/#agents"
),
)
def create_vectorstore_router_agent(
diff --git a/libs/langchain/langchain/chains/combine_documents/stuff.py b/libs/langchain/langchain/chains/combine_documents/stuff.py
index 26750d55fe8..2c9771d4965 100644
--- a/libs/langchain/langchain/chains/combine_documents/stuff.py
+++ b/libs/langchain/langchain/chains/combine_documents/stuff.py
@@ -102,7 +102,7 @@ def create_stuff_documents_chain(
message=(
"This class is deprecated. Use the `create_stuff_documents_chain` constructor "
"instead. See migration guide here: "
- "https://python.langchain.com/v0.2/docs/versions/migrating_chains/stuff_docs_chain/" # noqa: E501
+ "https://python.langchain.com/docs/versions/migrating_chains/stuff_docs_chain/" # noqa: E501
),
)
class StuffDocumentsChain(BaseCombineDocumentsChain):
diff --git a/libs/langchain/langchain/chains/conversation/base.py b/libs/langchain/langchain/chains/conversation/base.py
index 881eed49e8c..2399d963543 100644
--- a/libs/langchain/langchain/chains/conversation/base.py
+++ b/libs/langchain/langchain/chains/conversation/base.py
@@ -25,7 +25,7 @@ class ConversationChain(LLMChain):
"""Chain to have a conversation and load context from memory.
This class is deprecated in favor of ``RunnableWithMessageHistory``. Please refer
- to this tutorial for more detail: https://python.langchain.com/v0.2/docs/tutorials/chatbot/
+ to this tutorial for more detail: https://python.langchain.com/docs/tutorials/chatbot/
``RunnableWithMessageHistory`` offers several benefits, including:
diff --git a/libs/langchain/langchain/chains/mapreduce.py b/libs/langchain/langchain/chains/mapreduce.py
index c153b7f9a6d..d78d3f57c17 100644
--- a/libs/langchain/langchain/chains/mapreduce.py
+++ b/libs/langchain/langchain/chains/mapreduce.py
@@ -31,7 +31,7 @@ from langchain.chains.llm import LLMChain
"Refer here for a recommended map-reduce implementation using langgraph: "
"https://langchain-ai.github.io/langgraph/how-tos/map-reduce/. See also "
"migration guide: "
- "https://python.langchain.com/v0.2/docs/versions/migrating_chains/map_reduce_chain/" # noqa: E501
+ "https://python.langchain.com/docs/versions/migrating_chains/map_reduce_chain/" # noqa: E501
),
)
class MapReduceChain(Chain):
diff --git a/libs/langchain/langchain/chains/openai_functions/qa_with_structure.py b/libs/langchain/langchain/chains/openai_functions/qa_with_structure.py
index b7df60ef7fb..ad118ece28d 100644
--- a/libs/langchain/langchain/chains/openai_functions/qa_with_structure.py
+++ b/libs/langchain/langchain/chains/openai_functions/qa_with_structure.py
@@ -32,7 +32,7 @@ class AnswerWithSources(BaseModel):
message=(
"This function is deprecated. Refer to this guide on retrieval and question "
"answering with structured responses: "
- "https://python.langchain.com/v0.2/docs/how_to/qa_sources/#structure-sources-in-model-response" # noqa: E501
+ "https://python.langchain.com/docs/how_to/qa_sources/#structure-sources-in-model-response" # noqa: E501
),
)
def create_qa_with_structure_chain(
@@ -114,7 +114,7 @@ def create_qa_with_structure_chain(
message=(
"This function is deprecated. Refer to this guide on retrieval and question "
"answering with sources: "
- "https://python.langchain.com/v0.2/docs/how_to/qa_sources/#structure-sources-in-model-response" # noqa: E501
+ "https://python.langchain.com/docs/how_to/qa_sources/#structure-sources-in-model-response" # noqa: E501
),
)
def create_qa_with_sources_chain(
diff --git a/libs/langchain/langchain/chains/openai_functions/tagging.py b/libs/langchain/langchain/chains/openai_functions/tagging.py
index d8b8f9a9535..234226996cc 100644
--- a/libs/langchain/langchain/chains/openai_functions/tagging.py
+++ b/libs/langchain/langchain/chains/openai_functions/tagging.py
@@ -38,7 +38,7 @@ Passage:
"See API reference for this function for replacement: "
" " # noqa: E501
"You can read more about `with_structured_output` here: "
- ". "
+ ". "
"If you notice other issues, please provide "
"feedback here: "
""
@@ -78,7 +78,7 @@ def create_tagging_chain(
"Why did the cat cross the road? To get to the other "
"side... and then lay down in the middle of it!"
)
- Read more here: https://python.langchain.com/v0.2/docs/how_to/structured_output/
+ Read more here: https://python.langchain.com/docs/how_to/structured_output/
Args:
schema: The schema of the entities to extract.
@@ -109,7 +109,7 @@ def create_tagging_chain(
"See API reference for this function for replacement: "
" " # noqa: E501
"You can read more about `with_structured_output` here: "
- ". "
+ ". "
"If you notice other issues, please provide "
"feedback here: "
""
@@ -147,7 +147,7 @@ def create_tagging_chain_pydantic(
"Why did the cat cross the road? To get to the other "
"side... and then lay down in the middle of it!"
)
- Read more here: https://python.langchain.com/v0.2/docs/how_to/structured_output/
+ Read more here: https://python.langchain.com/docs/how_to/structured_output/
Args:
pydantic_schema: The pydantic schema of the entities to extract.
diff --git a/libs/langchain/langchain/chains/qa_with_sources/base.py b/libs/langchain/langchain/chains/qa_with_sources/base.py
index 495f0ab79e7..fac53f3cde0 100644
--- a/libs/langchain/langchain/chains/qa_with_sources/base.py
+++ b/libs/langchain/langchain/chains/qa_with_sources/base.py
@@ -37,7 +37,7 @@ from langchain.chains.qa_with_sources.map_reduce_prompt import (
message=(
"This class is deprecated. Refer to this guide on retrieval and question "
"answering with sources: "
- "https://python.langchain.com/v0.2/docs/how_to/qa_sources/"
+ "https://python.langchain.com/docs/how_to/qa_sources/"
),
)
class BaseQAWithSourcesChain(Chain, ABC):
@@ -216,7 +216,7 @@ class BaseQAWithSourcesChain(Chain, ABC):
message=(
"This class is deprecated. Refer to this guide on retrieval and question "
"answering with sources: "
- "https://python.langchain.com/v0.2/docs/how_to/qa_sources/"
+ "https://python.langchain.com/docs/how_to/qa_sources/"
),
)
class QAWithSourcesChain(BaseQAWithSourcesChain):
diff --git a/libs/langchain/langchain/chains/qa_with_sources/loading.py b/libs/langchain/langchain/chains/qa_with_sources/loading.py
index 24578216849..485f19efc02 100644
--- a/libs/langchain/langchain/chains/qa_with_sources/loading.py
+++ b/libs/langchain/langchain/chains/qa_with_sources/loading.py
@@ -158,13 +158,13 @@ def _load_refine_chain(
message=(
"This function is deprecated. Refer to this guide on retrieval and question "
"answering with sources: "
- "https://python.langchain.com/v0.2/docs/how_to/qa_sources/"
+ "https://python.langchain.com/docs/how_to/qa_sources/"
"\nSee also the following migration guides for replacements "
"based on `chain_type`:\n"
- "stuff: https://python.langchain.com/v0.2/docs/versions/migrating_chains/stuff_docs_chain\n" # noqa: E501
- "map_reduce: https://python.langchain.com/v0.2/docs/versions/migrating_chains/map_reduce_chain\n" # noqa: E501
- "refine: https://python.langchain.com/v0.2/docs/versions/migrating_chains/refine_chain\n" # noqa: E501
- "map_rerank: https://python.langchain.com/v0.2/docs/versions/migrating_chains/map_rerank_docs_chain\n" # noqa: E501
+ "stuff: https://python.langchain.com/docs/versions/migrating_chains/stuff_docs_chain\n" # noqa: E501
+ "map_reduce: https://python.langchain.com/docs/versions/migrating_chains/map_reduce_chain\n" # noqa: E501
+ "refine: https://python.langchain.com/docs/versions/migrating_chains/refine_chain\n" # noqa: E501
+ "map_rerank: https://python.langchain.com/docs/versions/migrating_chains/map_rerank_docs_chain\n" # noqa: E501
),
)
def load_qa_with_sources_chain(
diff --git a/libs/langchain/langchain/chains/question_answering/chain.py b/libs/langchain/langchain/chains/question_answering/chain.py
index c83895dc2a8..4c97d69838f 100644
--- a/libs/langchain/langchain/chains/question_answering/chain.py
+++ b/libs/langchain/langchain/chains/question_answering/chain.py
@@ -223,12 +223,12 @@ def _load_refine_chain(
message=(
"This class is deprecated. See the following migration guides for replacements "
"based on `chain_type`:\n"
- "stuff: https://python.langchain.com/v0.2/docs/versions/migrating_chains/stuff_docs_chain\n" # noqa: E501
- "map_reduce: https://python.langchain.com/v0.2/docs/versions/migrating_chains/map_reduce_chain\n" # noqa: E501
- "refine: https://python.langchain.com/v0.2/docs/versions/migrating_chains/refine_chain\n" # noqa: E501
- "map_rerank: https://python.langchain.com/v0.2/docs/versions/migrating_chains/map_rerank_docs_chain\n" # noqa: E501
+ "stuff: https://python.langchain.com/docs/versions/migrating_chains/stuff_docs_chain\n" # noqa: E501
+ "map_reduce: https://python.langchain.com/docs/versions/migrating_chains/map_reduce_chain\n" # noqa: E501
+ "refine: https://python.langchain.com/docs/versions/migrating_chains/refine_chain\n" # noqa: E501
+ "map_rerank: https://python.langchain.com/docs/versions/migrating_chains/map_rerank_docs_chain\n" # noqa: E501
"\nSee also guides on retrieval and question-answering here: "
- "https://python.langchain.com/v0.2/docs/how_to/#qa-with-rag"
+ "https://python.langchain.com/docs/how_to/#qa-with-rag"
),
)
def load_qa_chain(
diff --git a/libs/langchain/langchain/chains/retrieval_qa/base.py b/libs/langchain/langchain/chains/retrieval_qa/base.py
index 3d688474bd3..cf224e10c60 100644
--- a/libs/langchain/langchain/chains/retrieval_qa/base.py
+++ b/libs/langchain/langchain/chains/retrieval_qa/base.py
@@ -34,7 +34,7 @@ from langchain.chains.question_answering.stuff_prompt import PROMPT_SELECTOR
message=(
"This class is deprecated. Use the `create_retrieval_chain` constructor "
"instead. See migration guide here: "
- "https://python.langchain.com/v0.2/docs/versions/migrating_chains/retrieval_qa/"
+ "https://python.langchain.com/docs/versions/migrating_chains/retrieval_qa/"
),
)
class BaseRetrievalQA(Chain):
@@ -210,7 +210,7 @@ class BaseRetrievalQA(Chain):
message=(
"This class is deprecated. Use the `create_retrieval_chain` constructor "
"instead. See migration guide here: "
- "https://python.langchain.com/v0.2/docs/versions/migrating_chains/retrieval_qa/"
+ "https://python.langchain.com/docs/versions/migrating_chains/retrieval_qa/"
),
)
class RetrievalQA(BaseRetrievalQA):
@@ -295,7 +295,7 @@ class RetrievalQA(BaseRetrievalQA):
message=(
"This class is deprecated. Use the `create_retrieval_chain` constructor "
"instead. See migration guide here: "
- "https://python.langchain.com/v0.2/docs/versions/migrating_chains/retrieval_qa/"
+ "https://python.langchain.com/docs/versions/migrating_chains/retrieval_qa/"
),
)
class VectorDBQA(BaseRetrievalQA):
diff --git a/libs/partners/milvus/README.md b/libs/partners/milvus/README.md
index 80820f32d1b..26c0ee4fefd 100644
--- a/libs/partners/milvus/README.md
+++ b/libs/partners/milvus/README.md
@@ -10,7 +10,7 @@ pip install -U langchain-milvus
## Milvus vector database
-See a [usage example](https://python.langchain.com/v0.2/docs/integrations/vectorstores/milvus/)
+See a [usage example](https://python.langchain.com/docs/integrations/vectorstores/milvus/)
```python
from langchain_milvus import Milvus
@@ -18,7 +18,7 @@ from langchain_milvus import Milvus
## Milvus hybrid search
-See a [usage example](https://python.langchain.com/v0.2/docs/integrations/retrievers/milvus_hybrid_search/).
+See a [usage example](https://python.langchain.com/docs/integrations/retrievers/milvus_hybrid_search/).
```python
from langchain_milvus import MilvusCollectionHybridSearchRetriever
@@ -27,7 +27,7 @@ from langchain_milvus import MilvusCollectionHybridSearchRetriever
## Zilliz Cloud vector database
-See a [usage example](https://python.langchain.com/v0.2/docs/integrations/vectorstores/zilliz/).
+See a [usage example](https://python.langchain.com/docs/integrations/vectorstores/zilliz/).
```python
from langchain_milvus import Zilliz
@@ -35,7 +35,7 @@ from langchain_milvus import Zilliz
## Zilliz Cloud Pipeline Retriever
-See a [usage example](https://python.langchain.com/v0.2/docs/integrations/retrievers/zilliz_cloud_pipeline/).
+See a [usage example](https://python.langchain.com/docs/integrations/retrievers/zilliz_cloud_pipeline/).
```python
from langchain_milvus import ZillizCloudPipelineRetriever
diff --git a/libs/partners/mongodb/tests/integration_tests/test_chain_example.py b/libs/partners/mongodb/tests/integration_tests/test_chain_example.py
index 861a398cc8d..d54fa6cb01c 100644
--- a/libs/partners/mongodb/tests/integration_tests/test_chain_example.py
+++ b/libs/partners/mongodb/tests/integration_tests/test_chain_example.py
@@ -59,7 +59,7 @@ def test_chain(
) -> None:
"""Demonstrate usage of MongoDBAtlasVectorSearch in a realistic chain
- Follows example in the docs: https://python.langchain.com/v0.2/docs/how_to/hybrid/
+ Follows example in the docs: https://python.langchain.com/docs/how_to/hybrid/
Requires OpenAI_API_KEY for embedding and chat model.
Requires INDEX_NAME to have been set up on MONGODB_ATLAS_URI