diff --git a/cognee/modules/graph/utils/expand_with_nodes_and_edges.py b/cognee/modules/graph/utils/expand_with_nodes_and_edges.py index b392094aa..00998f4e7 100644 --- a/cognee/modules/graph/utils/expand_with_nodes_and_edges.py +++ b/cognee/modules/graph/utils/expand_with_nodes_and_edges.py @@ -15,12 +15,15 @@ from cognee.modules.ontology.rdf_xml.OntologyResolver import OntologyResolver def expand_with_nodes_and_edges( data_chunks: list[DocumentChunk], chunk_graphs: list[KnowledgeGraph], - ontology_resolver: OntologyResolver = OntologyResolver(), + ontology_resolver: OntologyResolver = None, existing_edges_map: Optional[dict[str, bool]] = None, ): if existing_edges_map is None: existing_edges_map = {} + if ontology_resolver is None: + ontology_resolver = OntologyResolver() + added_nodes_map = {} added_ontology_nodes_map = {} relationships = []