multiple: update docs urls to latest 2 (#26837)

This commit is contained in:
Erick Friis 2024-09-30 17:37:07 -07:00 committed by GitHub
parent 4a32cc3c66
commit 7ecd720120
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
30 changed files with 77 additions and 75 deletions

View File

@ -21,7 +21,7 @@
"\n", "\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", "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", "\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", "\n",
"## Overview\n", "## Overview\n",
"### Integration details\n", "### Integration details\n",
@ -30,7 +30,7 @@
"- TODO: Remove JS support link if not relevant, otherwise ensure link is correct.\n", "- TODO: Remove JS support link if not relevant, otherwise ensure link is correct.\n",
"- TODO: Make sure API reference links are correct.\n", "- TODO: Make sure API reference links are correct.\n",
"\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", "| :--- | :--- | :---: | :---: | :---: | :---: | :---: |\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/❌ | ✅/❌ | ![PyPI - Downloads](https://img.shields.io/pypi/dm/__package_name__?style=flat-square&label=%20) | ![PyPI - Version](https://img.shields.io/pypi/v/__package_name__?style=flat-square&label=%20) |\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/❌ | ✅/❌ | ![PyPI - Downloads](https://img.shields.io/pypi/dm/__package_name__?style=flat-square&label=%20) | ![PyPI - Version](https://img.shields.io/pypi/v/__package_name__?style=flat-square&label=%20) |\n",
"\n", "\n",

View File

@ -17,7 +17,7 @@
"\n", "\n",
"- TODO: Make sure API reference link is correct.\n", "- TODO: Make sure API reference link is correct.\n",
"\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", "\n",
"- TODO: Add any other relevant links, like information about underlying API, etc.\n", "- TODO: Add any other relevant links, like information about underlying API, etc.\n",
"\n", "\n",
@ -28,7 +28,7 @@
"- TODO: Remove JS support link if not relevant, otherwise ensure link is correct.\n", "- TODO: Remove JS support link if not relevant, otherwise ensure link is correct.\n",
"- TODO: Make sure API reference links are correct.\n", "- TODO: Make sure API reference links are correct.\n",
"\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", "| :--- | :--- | :---: | :---: | :---: |\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", "| [__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", "### Loader features\n",

View File

@ -28,7 +28,7 @@
"- TODO: Remove JS support link if not relevant, otherwise ensure link is correct.\n", "- TODO: Remove JS support link if not relevant, otherwise ensure link is correct.\n",
"- TODO: Make sure API reference links are correct.\n", "- TODO: Make sure API reference links are correct.\n",
"\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", "| :--- | :--- | :---: | :---: | :---: | :---: | :---: |\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/❌ | ✅/❌ | ![PyPI - Downloads](https://img.shields.io/pypi/dm/__package_name__?style=flat-square&label=%20) | ![PyPI - Version](https://img.shields.io/pypi/v/__package_name__?style=flat-square&label=%20) |\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/❌ | ✅/❌ | ![PyPI - Downloads](https://img.shields.io/pypi/dm/__package_name__?style=flat-square&label=%20) | ![PyPI - Version](https://img.shields.io/pypi/v/__package_name__?style=flat-square&label=%20) |\n",
"\n", "\n",

View File

@ -23,7 +23,7 @@
"\n", "\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", "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", "\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", "\n",
"## Overview\n", "## Overview\n",
"\n", "\n",
@ -35,7 +35,7 @@
"- TODO: Remove JS support link if not relevant, otherwise ensure link is correct.\n", "- TODO: Remove JS support link if not relevant, otherwise ensure link is correct.\n",
"- TODO: Make sure API reference links are correct.\n", "- TODO: Make sure API reference links are correct.\n",
"\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", "| :--- | :--- | :---: | :---: | :---: | :---: |\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) | ✅/❌ | ✅/❌ | ![PyPI - Downloads](https://img.shields.io/pypi/dm/__package_name__?style=flat-square&label=%20) | ![PyPI - Version](https://img.shields.io/pypi/v/__package_name__?style=flat-square&label=%20) |\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) | ✅/❌ | ✅/❌ | ![PyPI - Downloads](https://img.shields.io/pypi/dm/__package_name__?style=flat-square&label=%20) | ![PyPI - Version](https://img.shields.io/pypi/v/__package_name__?style=flat-square&label=%20) |\n",
"\n", "\n",

View File

@ -29,7 +29,7 @@
"\n", "\n",
"- TODO: Make sure links and features are correct\n", "- TODO: Make sure links and features are correct\n",
"\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", "| :--- | :--- | :---: | :---: | :---: |\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/❌ | ✅/❌ | ![PyPI - Version](https://img.shields.io/pypi/v/langchain-community?style=flat-square&label=%20) |\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/❌ | ✅/❌ | ![PyPI - Version](https://img.shields.io/pypi/v/langchain-community?style=flat-square&label=%20) |\n",
"\n", "\n",

View File

@ -292,9 +292,9 @@
"\n", "\n",
"For guides on how to use this vector store for retrieval-augmented generation (RAG), see the following sections:\n", "For guides on how to use this vector store for retrieval-augmented generation (RAG), see the following sections:\n",
"\n", "\n",
"- [Tutorials: working with external knowledge](https://python.langchain.com/v0.2/docs/tutorials/#working-with-external-knowledge)\n", "- [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/v0.2/docs/how_to/#qa-with-rag)\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/v0.2/docs/concepts/#retrieval)" "- [Retrieval conceptual docs](https://python.langchain.com/docs/concepts/#retrieval)"
] ]
}, },
{ {

View File

@ -166,7 +166,7 @@ class GitHubToolkit(BaseToolkit):
Setup: Setup:
See detailed installation instructions here: 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 You will need to install ``pygithub`` and set the following environment
variables: variables:

View File

@ -41,7 +41,7 @@ class GmailToolkit(BaseToolkit):
Setup: Setup:
You will need a Google credentials.json file to use this toolkit. 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: Key init args:
api_resource: Optional. The Google API resource. Default is None. api_resource: Optional. The Google API resource. Default is None.

View File

@ -79,7 +79,7 @@ class RecursiveUrlLoader(BaseLoader):
GET request to an endpoint on Bob's site. Both sites are hosted on the 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. 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: Setup:

View File

@ -115,7 +115,7 @@ class HtmlLinkExtractor(LinkExtractor[HtmlInput]):
loader = AsyncHtmlLoader( 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", "https://docs.datastax.com/en/astra/home/astra.html",
] ]
) )
@ -132,11 +132,11 @@ class HtmlLinkExtractor(LinkExtractor[HtmlInput]):
.. code-block:: output .. 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/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/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/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/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/introduction/')]
Using as_document_extractor() Using as_document_extractor()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -152,7 +152,7 @@ class HtmlLinkExtractor(LinkExtractor[HtmlInput]):
loader = AsyncHtmlLoader( 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", "https://docs.datastax.com/en/astra/home/astra.html",
] ]
) )
@ -167,11 +167,11 @@ class HtmlLinkExtractor(LinkExtractor[HtmlInput]):
.. code-block:: output .. 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/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/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/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/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/introduction/')]
Using LinkExtractorTransformer Using LinkExtractorTransformer
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -188,7 +188,7 @@ class HtmlLinkExtractor(LinkExtractor[HtmlInput]):
loader = AsyncHtmlLoader( 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", "https://docs.datastax.com/en/astra/home/astra.html",
] ]
) )
@ -201,11 +201,11 @@ class HtmlLinkExtractor(LinkExtractor[HtmlInput]):
.. code-block:: output .. 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/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/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/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/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/introduction/')]
We can check that there is a link from the first document to the second:: 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 .. 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`:: The documents with URL links can then be added to a :class:`~langchain_community.graph_vectorstores.base.GraphVectorStore`::

View File

@ -22,7 +22,7 @@ class AzureAISearchRetriever(BaseRetriever):
"""`Azure AI Search` service retriever. """`Azure AI Search` service retriever.
Setup: 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 We will need to install the below dependencies and set the required
environment variables: environment variables:

View File

@ -17,7 +17,7 @@ from langchain_community.vectorstores.milvus import Milvus
class MilvusRetriever(BaseRetriever): class MilvusRetriever(BaseRetriever):
"""Milvus API retriever. """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: Setup:
Install ``langchain-milvus`` and other dependencies: Install ``langchain-milvus`` and other dependencies:

View File

@ -29,7 +29,7 @@ from langchain_community.vectorstores.qdrant import Qdrant, QdrantException
"Qdrant vector store now supports sparse retrievals natively. " "Qdrant vector store now supports sparse retrievals natively. "
"Use langchain_qdrant.QdrantVectorStore#as_retriever() instead. " "Use langchain_qdrant.QdrantVectorStore#as_retriever() instead. "
"Reference: " "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", removal="0.5.0",
) )

View File

@ -8,7 +8,7 @@
Please see the migration guide for information on how to migrate existing Please see the migration guide for information on how to migrate existing
agents to modern langgraph agents: 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. Agents use language models to choose a sequence of actions to take.

View File

@ -19,7 +19,7 @@ information on how to implement a custom chat model.
To implement a custom Chat Model, inherit from `BaseChatModel`. See To implement a custom Chat Model, inherit from `BaseChatModel`. See
the following guide for more information on how to implement a custom Chat Model: 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** **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`. 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: 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 """ # noqa: E501

View File

@ -189,7 +189,7 @@ class BaseChatModel(BaseLanguageModel[BaseMessage], ABC):
+----------------------------------+--------------------------------------------------------------------+-------------------+ +----------------------------------+--------------------------------------------------------------------+-------------------+
Follow the guide for more information on how to implement a custom Chat Model: 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 """ # noqa: E501
@ -1103,7 +1103,9 @@ class BaseChatModel(BaseLanguageModel[BaseMessage], ABC):
def bind_tools( def bind_tools(
self, 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, **kwargs: Any,
) -> Runnable[LanguageModelInput, BaseMessage]: ) -> Runnable[LanguageModelInput, BaseMessage]:
raise NotImplementedError() raise NotImplementedError()

View File

@ -1417,7 +1417,7 @@ class LLM(BaseLLM):
Please see the following guide for more information on how to Please see the following guide for more information on how to
implement a custom LLM: 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 @abstractmethod

View File

@ -101,7 +101,7 @@ def create_importer(
f">> from {new_module} import {name}\n" f">> from {new_module} import {name}\n"
"You can use the langchain cli to **automatically** " "You can use the langchain cli to **automatically** "
"upgrade many imports. Please see documentation here " "upgrade many imports. Please see documentation here "
"<https://python.langchain.com/v0.2/docs/versions/v0_2/>" "<https://python.langchain.com/docs/versions/v0_2/>"
), ),
) )
return result return result
@ -133,7 +133,7 @@ def create_importer(
f">> from {fallback_module} import {name}\n" f">> from {fallback_module} import {name}\n"
"You can use the langchain cli to **automatically** " "You can use the langchain cli to **automatically** "
"upgrade many imports. Please see documentation here " "upgrade many imports. Please see documentation here "
"<https://python.langchain.com/v0.2/docs/versions/v0_2/>" "<https://python.langchain.com/docs/versions/v0_2/>"
), ),
) )
return result return result

View File

@ -23,7 +23,7 @@ from langchain.chains.llm import LLMChain
"See API reference for this function for a replacement implementation: " "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 "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: " "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( def create_vectorstore_agent(
@ -112,7 +112,7 @@ def create_vectorstore_agent(
"See API reference for this function for a replacement implementation: " "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 "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: " "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( def create_vectorstore_router_agent(

View File

@ -102,7 +102,7 @@ def create_stuff_documents_chain(
message=( message=(
"This class is deprecated. Use the `create_stuff_documents_chain` constructor " "This class is deprecated. Use the `create_stuff_documents_chain` constructor "
"instead. See migration guide here: " "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): class StuffDocumentsChain(BaseCombineDocumentsChain):

View File

@ -25,7 +25,7 @@ class ConversationChain(LLMChain):
"""Chain to have a conversation and load context from memory. """Chain to have a conversation and load context from memory.
This class is deprecated in favor of ``RunnableWithMessageHistory``. Please refer 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: ``RunnableWithMessageHistory`` offers several benefits, including:

View File

@ -31,7 +31,7 @@ from langchain.chains.llm import LLMChain
"Refer here for a recommended map-reduce implementation using langgraph: " "Refer here for a recommended map-reduce implementation using langgraph: "
"https://langchain-ai.github.io/langgraph/how-tos/map-reduce/. See also " "https://langchain-ai.github.io/langgraph/how-tos/map-reduce/. See also "
"migration guide: " "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): class MapReduceChain(Chain):

View File

@ -32,7 +32,7 @@ class AnswerWithSources(BaseModel):
message=( message=(
"This function is deprecated. Refer to this guide on retrieval and question " "This function is deprecated. Refer to this guide on retrieval and question "
"answering with structured responses: " "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( def create_qa_with_structure_chain(
@ -114,7 +114,7 @@ def create_qa_with_structure_chain(
message=( message=(
"This function is deprecated. Refer to this guide on retrieval and question " "This function is deprecated. Refer to this guide on retrieval and question "
"answering with sources: " "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( def create_qa_with_sources_chain(

View File

@ -38,7 +38,7 @@ Passage:
"See API reference for this function for replacement: " "See API reference for this function for replacement: "
"<https://api.python.langchain.com/en/latest/chains/langchain.chains.openai_functions.tagging.create_tagging_chain.html> " # noqa: E501 "<https://api.python.langchain.com/en/latest/chains/langchain.chains.openai_functions.tagging.create_tagging_chain.html> " # noqa: E501
"You can read more about `with_structured_output` here: " "You can read more about `with_structured_output` here: "
"<https://python.langchain.com/v0.2/docs/how_to/structured_output/>. " "<https://python.langchain.com/docs/how_to/structured_output/>. "
"If you notice other issues, please provide " "If you notice other issues, please provide "
"feedback here: " "feedback here: "
"<https://github.com/langchain-ai/langchain/discussions/18154>" "<https://github.com/langchain-ai/langchain/discussions/18154>"
@ -78,7 +78,7 @@ def create_tagging_chain(
"Why did the cat cross the road? To get to the other " "Why did the cat cross the road? To get to the other "
"side... and then lay down in the middle of it!" "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: Args:
schema: The schema of the entities to extract. schema: The schema of the entities to extract.
@ -109,7 +109,7 @@ def create_tagging_chain(
"See API reference for this function for replacement: " "See API reference for this function for replacement: "
"<https://api.python.langchain.com/en/latest/chains/langchain.chains.openai_functions.tagging.create_tagging_chain_pydantic.html> " # noqa: E501 "<https://api.python.langchain.com/en/latest/chains/langchain.chains.openai_functions.tagging.create_tagging_chain_pydantic.html> " # noqa: E501
"You can read more about `with_structured_output` here: " "You can read more about `with_structured_output` here: "
"<https://python.langchain.com/v0.2/docs/how_to/structured_output/>. " "<https://python.langchain.com/docs/how_to/structured_output/>. "
"If you notice other issues, please provide " "If you notice other issues, please provide "
"feedback here: " "feedback here: "
"<https://github.com/langchain-ai/langchain/discussions/18154>" "<https://github.com/langchain-ai/langchain/discussions/18154>"
@ -147,7 +147,7 @@ def create_tagging_chain_pydantic(
"Why did the cat cross the road? To get to the other " "Why did the cat cross the road? To get to the other "
"side... and then lay down in the middle of it!" "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: Args:
pydantic_schema: The pydantic schema of the entities to extract. pydantic_schema: The pydantic schema of the entities to extract.

View File

@ -37,7 +37,7 @@ from langchain.chains.qa_with_sources.map_reduce_prompt import (
message=( message=(
"This class is deprecated. Refer to this guide on retrieval and question " "This class is deprecated. Refer to this guide on retrieval and question "
"answering with sources: " "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): class BaseQAWithSourcesChain(Chain, ABC):
@ -216,7 +216,7 @@ class BaseQAWithSourcesChain(Chain, ABC):
message=( message=(
"This class is deprecated. Refer to this guide on retrieval and question " "This class is deprecated. Refer to this guide on retrieval and question "
"answering with sources: " "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): class QAWithSourcesChain(BaseQAWithSourcesChain):

View File

@ -158,13 +158,13 @@ def _load_refine_chain(
message=( message=(
"This function is deprecated. Refer to this guide on retrieval and question " "This function is deprecated. Refer to this guide on retrieval and question "
"answering with sources: " "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 " "\nSee also the following migration guides for replacements "
"based on `chain_type`:\n" "based on `chain_type`:\n"
"stuff: https://python.langchain.com/v0.2/docs/versions/migrating_chains/stuff_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/v0.2/docs/versions/migrating_chains/map_reduce_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/v0.2/docs/versions/migrating_chains/refine_chain\n" # noqa: E501 "refine: https://python.langchain.com/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 "map_rerank: https://python.langchain.com/docs/versions/migrating_chains/map_rerank_docs_chain\n" # noqa: E501
), ),
) )
def load_qa_with_sources_chain( def load_qa_with_sources_chain(

View File

@ -223,12 +223,12 @@ def _load_refine_chain(
message=( message=(
"This class is deprecated. See the following migration guides for replacements " "This class is deprecated. See the following migration guides for replacements "
"based on `chain_type`:\n" "based on `chain_type`:\n"
"stuff: https://python.langchain.com/v0.2/docs/versions/migrating_chains/stuff_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/v0.2/docs/versions/migrating_chains/map_reduce_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/v0.2/docs/versions/migrating_chains/refine_chain\n" # noqa: E501 "refine: https://python.langchain.com/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 "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: " "\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( def load_qa_chain(

View File

@ -34,7 +34,7 @@ from langchain.chains.question_answering.stuff_prompt import PROMPT_SELECTOR
message=( message=(
"This class is deprecated. Use the `create_retrieval_chain` constructor " "This class is deprecated. Use the `create_retrieval_chain` constructor "
"instead. See migration guide here: " "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): class BaseRetrievalQA(Chain):
@ -210,7 +210,7 @@ class BaseRetrievalQA(Chain):
message=( message=(
"This class is deprecated. Use the `create_retrieval_chain` constructor " "This class is deprecated. Use the `create_retrieval_chain` constructor "
"instead. See migration guide here: " "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): class RetrievalQA(BaseRetrievalQA):
@ -295,7 +295,7 @@ class RetrievalQA(BaseRetrievalQA):
message=( message=(
"This class is deprecated. Use the `create_retrieval_chain` constructor " "This class is deprecated. Use the `create_retrieval_chain` constructor "
"instead. See migration guide here: " "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): class VectorDBQA(BaseRetrievalQA):

View File

@ -10,7 +10,7 @@ pip install -U langchain-milvus
## Milvus vector database ## 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 ```python
from langchain_milvus import Milvus from langchain_milvus import Milvus
@ -18,7 +18,7 @@ from langchain_milvus import Milvus
## Milvus hybrid search ## 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 ```python
from langchain_milvus import MilvusCollectionHybridSearchRetriever from langchain_milvus import MilvusCollectionHybridSearchRetriever
@ -27,7 +27,7 @@ from langchain_milvus import MilvusCollectionHybridSearchRetriever
## Zilliz Cloud vector database ## 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 ```python
from langchain_milvus import Zilliz from langchain_milvus import Zilliz
@ -35,7 +35,7 @@ from langchain_milvus import Zilliz
## Zilliz Cloud Pipeline Retriever ## 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 ```python
from langchain_milvus import ZillizCloudPipelineRetriever from langchain_milvus import ZillizCloudPipelineRetriever

View File

@ -59,7 +59,7 @@ def test_chain(
) -> None: ) -> None:
"""Demonstrate usage of MongoDBAtlasVectorSearch in a realistic chain """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 OpenAI_API_KEY for embedding and chat model.
Requires INDEX_NAME to have been set up on MONGODB_ATLAS_URI Requires INDEX_NAME to have been set up on MONGODB_ATLAS_URI