Adds a list of GraphDocument objects that represent nodes and relationships
in a graph to a Kùzu backend.
add_graph_documents(
self,
graph_documents: List[GraphDocument],
allowed_relationships: List[Tuple[str, str, str]],
include_source: bool = False
) -> None| Name | Type | Description |
|---|---|---|
- graph_documents* | List[GraphDocument] | A list of |
- allowed_relationships* | List[Tuple[str, str, str]] | A list of allowed relationships that exist in the graph. Each tuple contains three elements: the source node type, the relationship type, and the target node type. Required for Kùzu, as the names of the relationship tables that need to pre-exist are derived from these tuples. |
- include_source* | bool | If True, stores the source document
and links it to nodes in the graph using the |