Skip to content

The agent engineering platform.

community: deprecate graph vector store (#30328)

Ben Chambersc5e42a402749
diff --git a/libs/community/langchain_community/graph_vectorstores/base.py b/libs/community/langchain_community/graph_vectorstores/base.py
index e779af5f14..58be972b14 100644
--- a/libs/community/langchain_community/graph_vectorstores/base.py
+++ b/libs/community/langchain_community/graph_vectorstores/base.py
@@ -11,7 +11,7 @@ from typing import (
cast,
)
-from langchain_core._api import beta
+from langchain_core._api import deprecated
from langchain_core.callbacks import (
AsyncCallbackManagerForRetrieverRun,
CallbackManagerForRetrieverRun,
@@ -34,7 +34,17 @@ def _has_next(iterator: Iterator) -> bool:
return next(iterator, sentinel) is not sentinel
-@beta()
+DEPRECATION_ADDENDUM = (
+ "See https://datastax.github.io/graph-rag/guide/migration/"
+ "#from-langchain-graphvectorstore for migration instructions."
+)
+
+
+@deprecated(
+ since="0.3.21",
+ removal="0.5",
+ addendum=DEPRECATION_ADDENDUM,
+)
class Node(Serializable):
"""Node in the GraphVectorStore.
@@ -119,7 +129,11 @@ def _documents_to_nodes(documents: Iterable[Document]) -> Iterator[Node]:
)
-@beta()
+@deprecated(
+ since="0.3.21",
+ removal="0.5",
+ addendum=DEPRECATION_ADDENDUM,
+)
def nodes_to_documents(nodes: Iterable[Node]) -> Iterator[Document]:
"""Convert nodes to documents.
@@ -143,7 +157,11 @@ def nodes_to_documents(nodes: Iterable[Node]) -> Iterator[Document]:
)
-@beta(message="Added in version 0.3.1 of langchain_community. API subject to change.")
+@deprecated(
+ since="0.3.21",
+ removal="0.5",
+ addendum=DEPRECATION_ADDENDUM,
+)
class GraphVectorStore(VectorStore):
"""A hybrid vector-and-graph graph store.
@@ -705,7 +723,11 @@ class GraphVectorStore(VectorStore):
return GraphVectorStoreRetriever(vectorstore=self, **kwargs)
-@beta(message="Added in version 0.3.1 of langchain_community. API subject to change.")
+@deprecated(
+ since="0.3.21",
+ removal="0.5",
+ addendum=DEPRECATION_ADDENDUM,
+)
class GraphVectorStoreRetriever(VectorStoreRetriever):
"""Retriever for GraphVectorStore.