From 9fce03e7db3516f9d7b4a5e461c308ef5450fcb3 Mon Sep 17 00:00:00 2001 From: Tomaz Bratanic Date: Mon, 13 May 2024 21:26:06 +0200 Subject: [PATCH] community[patch]: Fix neo4j enhanced schema (#21582) --- libs/community/langchain_community/graphs/neo4j_graph.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/community/langchain_community/graphs/neo4j_graph.py b/libs/community/langchain_community/graphs/neo4j_graph.py index 82809e495f..697b2221cb 100644 --- a/libs/community/langchain_community/graphs/neo4j_graph.py +++ b/libs/community/langchain_community/graphs/neo4j_graph.py @@ -573,9 +573,9 @@ class Neo4jGraph(GraphStore): is_relationship: bool = False, ) -> str: if is_relationship: - match_clause = f"MATCH ()-[n:{label_or_type}]->()" + match_clause = f"MATCH ()-[n:`{label_or_type}`]->()" else: - match_clause = f"MATCH (n:{label_or_type})" + match_clause = f"MATCH (n:`{label_or_type}`)" with_clauses = [] return_clauses = []