11from langchain_neo4j import Neo4jGraph
22from langchain .docstore .document import Document
33from src .shared .common_fn import load_embedding_model ,execute_graph_query
4+ from src .shared .common_fn import load_embedding_model ,execute_graph_query
45import logging
56from typing import List
67import os
@@ -34,6 +35,7 @@ def merge_relationship_between_chunk_and_entites(graph: Neo4jGraph, graph_docume
3435 MERGE (c)-[:HAS_ENTITY]->(n)
3536 """
3637 execute_graph_query (graph ,unwind_query , params = {"batch_data" : batch_data })
38+ execute_graph_query (graph ,unwind_query , params = {"batch_data" : batch_data })
3739
3840
3941def create_chunk_embeddings (graph , chunkId_chunkDoc_list , file_name ):
@@ -60,6 +62,7 @@ def create_chunk_embeddings(graph, chunkId_chunkDoc_list, file_name):
6062 MERGE (c)-[:PART_OF]->(d)
6163 """
6264 execute_graph_query (graph ,query_to_create_embedding , params = {"fileName" :file_name , "data" :data_for_query })
65+ execute_graph_query (graph ,query_to_create_embedding , params = {"fileName" :file_name , "data" :data_for_query })
6366
6467def create_relation_between_chunks (graph , file_name , chunks : List [Document ])-> list :
6568 logging .info ("creating FIRST_CHUNK and NEXT_CHUNK relationships between chunks" )
@@ -128,6 +131,7 @@ def create_relation_between_chunks(graph, file_name, chunks: List[Document])->li
128131 MERGE (c)-[:PART_OF]->(d)
129132 """
130133 execute_graph_query (graph ,query_to_create_chunk_and_PART_OF_relation , params = {"batch_data" : batch_data })
134+ execute_graph_query (graph ,query_to_create_chunk_and_PART_OF_relation , params = {"batch_data" : batch_data })
131135
132136 query_to_create_FIRST_relation = """
133137 UNWIND $relationships AS relationship
@@ -137,6 +141,7 @@ def create_relation_between_chunks(graph, file_name, chunks: List[Document])->li
137141 MERGE (d)-[:FIRST_CHUNK]->(c))
138142 """
139143 execute_graph_query (graph ,query_to_create_FIRST_relation , params = {"f_name" : file_name , "relationships" : relationships })
144+ execute_graph_query (graph ,query_to_create_FIRST_relation , params = {"f_name" : file_name , "relationships" : relationships })
140145
141146 query_to_create_NEXT_CHUNK_relation = """
142147 UNWIND $relationships AS relationship
0 commit comments