experimental: Fix llm graph transformer bug (#21362)

This commit is contained in:
Tomaz Bratanic 2024-05-07 08:59:55 +02:00 committed by GitHub
parent bb81ae5c8c
commit ad3fd44a7f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -531,8 +531,8 @@ class LLMGraphTransformer:
source=source_node, target=target_node, type=rel["relation"]
)
)
# Create nodes list
nodes = [Node(id=el[0], type=el[1]) for el in list(nodes_set)]
# Create nodes list
nodes = [Node(id=el[0], type=el[1]) for el in list(nodes_set)]
# Strict mode filtering
if self.strict_mode and (self.allowed_nodes or self.allowed_relationships):