NodesList#
- class langchain_experimental.graph_transformers.diffbot.NodesList[source]#
List of nodes with associated properties.
- nodes#
Stores nodes as keys and their properties as values. Each key is a tuple where the first element is the node ID and the second is the node type.
- Type:
Dict[Tuple, Any]
Methods
__init__
()add_node_property
(node,Β properties)Adds or updates node properties.
Returns the nodes as a list of Node objects.
- add_node_property(node: Tuple[str | int, str], properties: Dict[str, Any]) None [source]#
Adds or updates node properties.
If the node does not exist in the list, itβs added along with its properties. If the node already exists, its properties are updated with the new values.
- Parameters:
node (Tuple) β A tuple containing the node ID and node type.
properties (Dict) β A dictionary of properties to add or update for the node.
- Return type:
None