add_graph_documents(
self,
graph_documents: List[GraphDocument],
allowed_relationships: List[Tuple[str| Name | Type | Description |
|---|---|---|
- graph_documents* | List[GraphDocument] | A list of |
- allowed_relationships* | List[Tuple[str, str, str]] | |
- include_source* | bool |
Adds a list of GraphDocument objects that represent nodes and relationships
in a graph to a Kùzu backend.
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.
If True, stores the source document
and links it to nodes in the graph using the MENTIONS relationship.
This is useful for tracing back the origin of data. Merges source
documents based on the id property from the source document metadata
if available; otherwise it calculates the MD5 hash of page_content
for merging process. Defaults to False.