node classification failsafe - remove node labels not part of the custom ontology (#295)

* node classification failsafe

* Update graphiti_core/utils/maintenance/node_operations.py

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* test update

* dict.keys update

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
This commit is contained in:
Preston Rasmussen 2025-03-18 18:32:56 -04:00 committed by GitHub
parent f651984bd8
commit d91aaa052c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View file

@ -189,6 +189,9 @@ async def extract_nodes(
new_nodes = []
for name in extracted_node_names:
entity_type = node_classifications.get(name)
if entity_types is not None and entity_type not in entity_types:
entity_type = None
labels = (
['Entity']
if entity_type is None or entity_type == 'None' or entity_type == 'null'

View file

@ -1,6 +1,6 @@
[tool.poetry]
name = "graphiti-core"
version = "0.8.0"
version = "0.8.1"
description = "A temporal graph building library"
authors = [
"Paul Paliychuk <paul@getzep.com>",