Skip to content

Commit bad33f6

Browse files
authored
make node record loading more robust (camel-ai#363)
don't throw an error if certain pieces of the dict don't exist
1 parent 45b15a0 commit bad33f6

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

graphiti_core/nodes.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -550,12 +550,12 @@ def get_entity_node_from_record(record: Any) -> EntityNode:
550550
attributes=record['attributes'],
551551
)
552552

553-
del entity_node.attributes['uuid']
554-
del entity_node.attributes['name']
555-
del entity_node.attributes['group_id']
556-
del entity_node.attributes['name_embedding']
557-
del entity_node.attributes['summary']
558-
del entity_node.attributes['created_at']
553+
entity_node.attributes.pop('uuid', None)
554+
entity_node.attributes.pop('name', None)
555+
entity_node.attributes.pop('group_id', None)
556+
entity_node.attributes.pop('name_embedding', None)
557+
entity_node.attributes.pop('summary', None)
558+
entity_node.attributes.pop('created_at', None)
559559

560560
return entity_node
561561

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
name = "graphiti-core"
33
description = "A temporal graph building library"
4-
version = "0.10.0"
4+
version = "0.10.1"
55
authors = [
66
{ "name" = "Paul Paliychuk", "email" = "[email protected]" },
77
{ "name" = "Preston Rasmussen", "email" = "[email protected]" },

0 commit comments

Comments
 (0)