make node record loading more robust (#363)

don't throw an error if certain pieces of the dict don't exist
This commit is contained in:
Preston Rasmussen 2025-04-16 10:32:03 -04:00 committed by GitHub
parent 45b15a06f2
commit bad33f698e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 7 deletions

View file

@ -550,12 +550,12 @@ def get_entity_node_from_record(record: Any) -> EntityNode:
attributes=record['attributes'], attributes=record['attributes'],
) )
del entity_node.attributes['uuid'] entity_node.attributes.pop('uuid', None)
del entity_node.attributes['name'] entity_node.attributes.pop('name', None)
del entity_node.attributes['group_id'] entity_node.attributes.pop('group_id', None)
del entity_node.attributes['name_embedding'] entity_node.attributes.pop('name_embedding', None)
del entity_node.attributes['summary'] entity_node.attributes.pop('summary', None)
del entity_node.attributes['created_at'] entity_node.attributes.pop('created_at', None)
return entity_node return entity_node

View file

@ -1,7 +1,7 @@
[project] [project]
name = "graphiti-core" name = "graphiti-core"
description = "A temporal graph building library" description = "A temporal graph building library"
version = "0.10.0" version = "0.10.1"
authors = [ authors = [
{ "name" = "Paul Paliychuk", "email" = "paul@getzep.com" }, { "name" = "Paul Paliychuk", "email" = "paul@getzep.com" },
{ "name" = "Preston Rasmussen", "email" = "preston@getzep.com" }, { "name" = "Preston Rasmussen", "email" = "preston@getzep.com" },