diff --git a/graphiti_core/utils/maintenance/node_operations.py b/graphiti_core/utils/maintenance/node_operations.py index 425529d7..e0610433 100644 --- a/graphiti_core/utils/maintenance/node_operations.py +++ b/graphiti_core/utils/maintenance/node_operations.py @@ -158,13 +158,17 @@ async def extract_nodes( node_classifications: dict[str, str | None] = {} if entity_types is not None: - llm_response = await llm_client.generate_response( - prompt_library.extract_nodes.classify_nodes(node_classification_context), - response_model=EntityClassification, - ) - entities = llm_response.get('entities', []) - entity_classifications = llm_response.get('entity_classifications', []) - node_classifications.update(dict(zip(entities, entity_classifications))) + try: + llm_response = await llm_client.generate_response( + prompt_library.extract_nodes.classify_nodes(node_classification_context), + response_model=EntityClassification, + ) + entities = llm_response.get('entities', []) + entity_classifications = llm_response.get('entity_classifications', []) + node_classifications.update(dict(zip(entities, entity_classifications))) + # catch classification errors and continue if we can't classify + except Exception as e: + logger.exception(e) end = time() logger.debug(f'Extracted new nodes: {extracted_node_names} in {(end - start) * 1000} ms') diff --git a/pyproject.toml b/pyproject.toml index bbe09393..7b7f77b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "graphiti-core" -version = "0.7.5" +version = "0.7.6" description = "A temporal graph building library" authors = [ "Paul Paliychuk ",