Skip to content

Commit

Permalink
added global embedding
Browse files Browse the repository at this point in the history
  • Loading branch information
vasanthasaikalluri committed Sep 13, 2024
1 parent dde29f2 commit 93a4698
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backend/score.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ async def generate():
graph = create_graph_database_connection(uri, userName, decoded_password, database)
graphDb_data_Access = graphDBdataAccess(graph)
result = graphDb_data_Access.get_current_status_document_node(file_name)
print(f'Result of document status in SSE : {result}')
# print(f'Result of document status in SSE : {result}')
if len(result) > 0:
status = json.dumps({'fileName':file_name,
'status':result[0]['Status'],
Expand Down
7 changes: 5 additions & 2 deletions backend/src/make_relationships.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@

logging.basicConfig(format='%(asctime)s - %(message)s',level='INFO')

EMBEDDING_MODEL = os.getenv('EMBEDDING_MODEL')
EMBEDDING_FUNCTION , EMBEDDING_DIMENSION = load_embedding_model(EMBEDDING_MODEL)

def merge_relationship_between_chunk_and_entites(graph: Neo4jGraph, graph_documents_chunk_chunk_Id : list):
batch_data = []
logging.info("Create HAS_ENTITY relationship between chunks and entities")
Expand Down Expand Up @@ -39,9 +42,9 @@ def merge_relationship_between_chunk_and_entites(graph: Neo4jGraph, graph_docume
def update_embedding_create_vector_index(graph, chunkId_chunkDoc_list, file_name):
#create embedding
isEmbedding = os.getenv('IS_EMBEDDING')
embedding_model = os.getenv('EMBEDDING_MODEL')
# embedding_model = os.getenv('EMBEDDING_MODEL')

embeddings, dimension = load_embedding_model(embedding_model)
embeddings, dimension = EMBEDDING_FUNCTION , EMBEDDING_DIMENSION
logging.info(f'embedding model:{embeddings} and dimesion:{dimension}')
data_for_query = []
logging.info(f"update embedding and vector index for chunks")
Expand Down

0 comments on commit 93a4698

Please sign in to comment.