KnowledgeGraphData

A renderable subgraph of a collection’s knowledge graph (issue

Properties

Name

Type

Description

Notes

nodes

List[KnowledgeGraphVizNode]

edges

List[KnowledgeGraphVizEdge]

is_truncated

bool

True when the graph exceeded max_nodes and was degree-capped.

total_nodes

int

Total entities in the full graph (the nodes above are degree-ranked and capped at max_nodes). Null unless this is a truncated whole-graph view – a focused subgraph or a complete (untruncated) graph carries no separate total.

[optional]

total_relationships

int

Total relationships in the full graph. Null unless this is a truncated whole-graph view.

[optional]

Example

from h2ogpte.rest_sync.models.knowledge_graph_data import KnowledgeGraphData

# TODO update the JSON string below
json = "{}"
# create an instance of KnowledgeGraphData from a JSON string
knowledge_graph_data_instance = KnowledgeGraphData.from_json(json)
# print the JSON string representation of the object
print(KnowledgeGraphData.to_json())

# convert the object into a dict
knowledge_graph_data_dict = knowledge_graph_data_instance.to_dict()
# create an instance of KnowledgeGraphData from a dict
knowledge_graph_data_from_dict = KnowledgeGraphData.from_dict(knowledge_graph_data_dict)