The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
Docs: Add self-querying retriever and store to AstraDB provider doc (#16362)
Christophe Bornetf9be877ed72d
diff --git a/docs/docs/integrations/providers/astradb.mdx b/docs/docs/integrations/providers/astradb.mdxindex e4c69d0e42..20a94d736b 100644--- a/docs/docs/integrations/providers/astradb.mdx+++ b/docs/docs/integrations/providers/astradb.mdx@@ -20,10 +20,10 @@ pip install "astrapy>=0.5.3"```pythonfrom langchain_community.vectorstores import AstraDBvector_store = AstraDB(- embedding=my_embedding,- collection_name="my_store",- api_endpoint="...",- token="...",+ embedding=my_embedding,+ collection_name="my_store",+ api_endpoint="...",+ token="...",)```@@ -40,7 +40,7 @@ set_llm_cache(AstraDBCache())```-Learn more in the [example notebook](/docs/integrations/llms/llm_caching) (scroll to the Astra DB section).+Learn more in the [example notebook](/docs/integrations/llms/llm_caching#astra-db-caches) (scroll to the Astra DB section).### Semantic LLM Cache@@ -55,14 +55,14 @@ set_llm_cache(AstraDBSemanticCache())```-Learn more in the [example notebook](/docs/integrations/llms/llm_caching) (scroll to the appropriate section).+Learn more in the [example notebook](/docs/integrations/llms/llm_caching#astra-db-caches) (scroll to the appropriate section).### Chat message history```pythonfrom langchain.memory import AstraDBChatMessageHistorymessage_history = AstraDBChatMessageHistory(- session_id="test-session"+ session_id="test-session",api_endpoint="...",token="...",)@@ -75,14 +75,62 @@ Learn more in the [example notebook](/docs/integrations/memory/astradb_chat_mess```pythonfrom langchain_community.document_loaders import AstraDBLoaderloader = AstraDBLoader(+ collection_name="my_collection",api_endpoint="...",- token="...",- collection_name="my_collection"+ token="...")```Learn more in the [example notebook](/docs/integrations/document_loaders/astradb).+### Self-querying retriever++```python+from langchain_community.vectorstores import AstraDB+from langchain.retrievers.self_query.base import SelfQueryRetriever++vector_store = AstraDB(+ embedding=my_embedding,+ collection_name="my_store",+ api_endpoint="...",+ token="...",+)++retriever = SelfQueryRetriever.from_llm(+ my_llm,+ vector_store,+ document_content_description,+ metadata_field_info+)+```++Learn more in the [example notebook](/docs/integrations/retrievers/self_query/astradb).++### Store++```python+from langchain_community.storage import AstraDBStore+store = AstraDBStore(+ collection_name="my_kv_store",+ api_endpoint="...",+ token="..."+)+```++Learn more in the [example notebook](/docs/integrations/stores/astradb#astradbstore).++### Byte Store++```python+from langchain_community.storage import AstraDBByteStore+store = AstraDBByteStore(+ collection_name="my_kv_store",+ api_endpoint="...",+ token="..."+)+```++Learn more in the [example notebook](/docs/integrations/stores/astradb#astradbbytestore).## Apache Cassandra and Astra DB through CQL@@ -98,12 +146,12 @@ Hence, a different set of connectors, outlined below, shall be used.```pythonfrom langchain_community.vectorstores import Cassandravector_store = Cassandra(- embedding=my_embedding,- table_name="my_store",+ embedding=my_embedding,+ table_name="my_store",)```-Learn more in the [example notebook](/docs/integrations/vectorstores/astradb) (scroll down to the CQL-specific section).+Learn more in the [example notebook](/docs/integrations/vectorstores/astradb#apache-cassandra-and-astra-db-through-cql) (scroll down to the CQL-specific section).### Memory@@ -123,7 +171,7 @@ from langchain.cache import CassandraCachelangchain.llm_cache = CassandraCache()```-Learn more in the [example notebook](/docs/integrations/llms/llm_caching) (scroll to the Cassandra section).+Learn more in the [example notebook](/docs/integrations/llms/llm_caching#cassandra-caches) (scroll to the Cassandra section).### Semantic LLM Cache@@ -131,9 +179,9 @@ Learn more in the [example notebook](/docs/integrations/llms/llm_caching) (scrol```pythonfrom langchain.cache import CassandraSemanticCachecassSemanticCache = CassandraSemanticCache(- embedding=my_embedding,- table_name="my_store",+ embedding=my_embedding,+ table_name="my_store",)```-Learn more in the [example notebook](/docs/integrations/llms/llm_caching) (scroll to the appropriate section).+Learn more in the [example notebook](/docs/integrations/llms/llm_caching#cassandra-caches) (scroll to the appropriate section).