mirror of
https://github.com/hwchase17/langchain.git
synced 2025-04-28 20:05:58 +00:00
community: deprecate graph vector store (#30328)
- **Description:** mark GraphVectorStore `@deprecated` --------- Co-authored-by: Chester Curme <chester.curme@gmail.com>
This commit is contained in:
parent
a8ce63903d
commit
c5e42a4027
@ -11,7 +11,7 @@ from typing import (
|
|||||||
cast,
|
cast,
|
||||||
)
|
)
|
||||||
|
|
||||||
from langchain_core._api import beta
|
from langchain_core._api import deprecated
|
||||||
from langchain_core.callbacks import (
|
from langchain_core.callbacks import (
|
||||||
AsyncCallbackManagerForRetrieverRun,
|
AsyncCallbackManagerForRetrieverRun,
|
||||||
CallbackManagerForRetrieverRun,
|
CallbackManagerForRetrieverRun,
|
||||||
@ -34,7 +34,17 @@ def _has_next(iterator: Iterator) -> bool:
|
|||||||
return next(iterator, sentinel) is not sentinel
|
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):
|
class Node(Serializable):
|
||||||
"""Node in the GraphVectorStore.
|
"""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]:
|
def nodes_to_documents(nodes: Iterable[Node]) -> Iterator[Document]:
|
||||||
"""Convert nodes to documents.
|
"""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):
|
class GraphVectorStore(VectorStore):
|
||||||
"""A hybrid vector-and-graph graph store.
|
"""A hybrid vector-and-graph graph store.
|
||||||
|
|
||||||
@ -705,7 +723,11 @@ class GraphVectorStore(VectorStore):
|
|||||||
return GraphVectorStoreRetriever(vectorstore=self, **kwargs)
|
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):
|
class GraphVectorStoreRetriever(VectorStoreRetriever):
|
||||||
"""Retriever for GraphVectorStore.
|
"""Retriever for GraphVectorStore.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user