Skip to content

Commit c5e42a4

Browse files
bjchambersccurme
andauthored
community: deprecate graph vector store (#30328)
- **Description:** mark GraphVectorStore `@deprecated` --------- Co-authored-by: Chester Curme <[email protected]>
1 parent a8ce639 commit c5e42a4

File tree

1 file changed

+27
-5
lines changed
  • libs/community/langchain_community/graph_vectorstores

1 file changed

+27
-5
lines changed

libs/community/langchain_community/graph_vectorstores/base.py

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
cast,
1212
)
1313

14-
from langchain_core._api import beta
14+
from langchain_core._api import deprecated
1515
from langchain_core.callbacks import (
1616
AsyncCallbackManagerForRetrieverRun,
1717
CallbackManagerForRetrieverRun,
@@ -34,7 +34,17 @@ def _has_next(iterator: Iterator) -> bool:
3434
return next(iterator, sentinel) is not sentinel
3535

3636

37-
@beta()
37+
DEPRECATION_ADDENDUM = (
38+
"See https://datastax.github.io/graph-rag/guide/migration/"
39+
"#from-langchain-graphvectorstore for migration instructions."
40+
)
41+
42+
43+
@deprecated(
44+
since="0.3.21",
45+
removal="0.5",
46+
addendum=DEPRECATION_ADDENDUM,
47+
)
3848
class Node(Serializable):
3949
"""Node in the GraphVectorStore.
4050
@@ -119,7 +129,11 @@ def _documents_to_nodes(documents: Iterable[Document]) -> Iterator[Node]:
119129
)
120130

121131

122-
@beta()
132+
@deprecated(
133+
since="0.3.21",
134+
removal="0.5",
135+
addendum=DEPRECATION_ADDENDUM,
136+
)
123137
def nodes_to_documents(nodes: Iterable[Node]) -> Iterator[Document]:
124138
"""Convert nodes to documents.
125139
@@ -143,7 +157,11 @@ def nodes_to_documents(nodes: Iterable[Node]) -> Iterator[Document]:
143157
)
144158

145159

146-
@beta(message="Added in version 0.3.1 of langchain_community. API subject to change.")
160+
@deprecated(
161+
since="0.3.21",
162+
removal="0.5",
163+
addendum=DEPRECATION_ADDENDUM,
164+
)
147165
class GraphVectorStore(VectorStore):
148166
"""A hybrid vector-and-graph graph store.
149167
@@ -705,7 +723,11 @@ def as_retriever(self, **kwargs: Any) -> GraphVectorStoreRetriever:
705723
return GraphVectorStoreRetriever(vectorstore=self, **kwargs)
706724

707725

708-
@beta(message="Added in version 0.3.1 of langchain_community. API subject to change.")
726+
@deprecated(
727+
since="0.3.21",
728+
removal="0.5",
729+
addendum=DEPRECATION_ADDENDUM,
730+
)
709731
class GraphVectorStoreRetriever(VectorStoreRetriever):
710732
"""Retriever for GraphVectorStore.
711733

0 commit comments

Comments
 (0)