💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows
Python agentsaiai-agentsembeddingsinformation-retrievallanguage-modellarge-language-modelsllmnlppythonragretrieval-augmented-generationsearchsearch-enginesemantic-searchsentence-embeddingstransformerstxtaivector-databasevector-search
Handle GrandCypher API change, closes #909
davidmezzetti484b366608a4
diff --git a/src/python/txtai/graph/networkx.py b/src/python/txtai/graph/networkx.pyindex 9076030d..d0a81f47 100644--- a/src/python/txtai/graph/networkx.py+++ b/src/python/txtai/graph/networkx.py@@ -132,8 +132,11 @@ class NetworkX(Graph):if isinstance(value, list):# Path groupnodes.update([node for node in value if node and not isinstance(node, dict)])+ elif isinstance(value, dict):+ # Nodes by id attribute+ nodes.update(uid for uid, attr in self.scan(data=True) if attr["id"] == value["id"])elif value is not None:- # Single result+ # Single node idnodes.add(value)return self.filter(list(nodes))diff --git a/test/python/testgraph.py b/test/python/testgraph.pyindex 1f40f5c2..62d311b9 100644--- a/test/python/testgraph.py+++ b/test/python/testgraph.py@@ -446,7 +446,7 @@ class TestGraph(unittest.TestCase):g = self.embeddings.search("""MATCH (A)-[]->(B)- RETURN A, B+ RETURN A, ID(B)""",graph=True,)