The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
community[patch]: Use langchain-astradb for AstraDB doc loader (#19071)
Christophe Bornetf2a7dda4bdcd
diff --git a/docs/docs/integrations/providers/astradb.mdx b/docs/docs/integrations/providers/astradb.mdxindex f1e9cf0705..bda8621395 100644--- a/docs/docs/integrations/providers/astradb.mdx+++ b/docs/docs/integrations/providers/astradb.mdx@@ -10,12 +10,7 @@ See a [tutorial provided by DataStax](https://docs.datastax.com/en/astra/astra-dInstall the following Python package:```bash-pip install "langchain-astradb>=0.0.1"-```--Some old integrations require the `astrapy` package:-```bash-pip install "astrapy>=0.7.1"+pip install "langchain-astradb>=0.1.0"```Get the [connection secrets](https://docs.datastax.com/en/astra/astra-db-vector/get-started/quickstart.html).@@ -92,7 +87,7 @@ Learn more in the [example notebook](/docs/integrations/memory/astradb_chat_mess## Document loader```python-from langchain_community.document_loaders import AstraDBLoader+from langchain_astradb import AstraDBLoaderloader = AstraDBLoader(collection_name="my_collection",@@ -129,7 +124,7 @@ Learn more in the [example notebook](/docs/integrations/retrievers/self_query/as## Store```python-from langchain_community.storage import AstraDBStore+from langchain_astradb import AstraDBStorestore = AstraDBStore(collection_name="my_kv_store",@@ -143,7 +138,7 @@ Learn more in the [example notebook](/docs/integrations/stores/astradb#astradbst## Byte Store```python-from langchain_community.storage import AstraDBByteStore+from langchain_astradb import AstraDBByteStorestore = AstraDBByteStore(collection_name="my_kv_store",diff --git a/libs/community/langchain_community/document_loaders/astradb.py b/libs/community/langchain_community/document_loaders/astradb.pyindex 5f1b82cc42..2898f2eaec 100644--- a/libs/community/langchain_community/document_loaders/astradb.py+++ b/libs/community/langchain_community/document_loaders/astradb.py@@ -13,6 +13,7 @@ from typing import (Optional,)+from langchain_core._api.deprecation import deprecatedfrom langchain_core.documents import Documentfrom langchain_community.document_loaders.base import BaseLoader@@ -24,6 +25,11 @@ if TYPE_CHECKING:logger = logging.getLogger(__name__)+@deprecated(+ since="0.0.29",+ removal="0.2.0",+ alternative_import="langchain_astradb.AstraDBLoader",+)class AstraDBLoader(BaseLoader):def __init__(self,