Skip to content

Commit 8c1e4d4

Browse files
im-ajaymeenapraveshkumar1988
authored andcommitted
get emb only if used (#278)
1 parent b016dbf commit 8c1e4d4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

backend/src/make_relationships.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ def update_embedding_create_vector_index(graph, chunkId_chunkDoc_list, file_name
4747
logging.info(f"update embedding and vector index for chunks")
4848
for row in chunkId_chunkDoc_list:
4949
# for graph_document in row['graph_doc']:
50-
embeddings_arr = embeddings.embed_query(row['chunk_doc'].page_content)
51-
# logging.info(f'Embedding list {embeddings}')
5250
if isEmbedding.upper() == "TRUE":
53-
51+
embeddings_arr = embeddings.embed_query(row['chunk_doc'].page_content)
52+
# logging.info(f'Embedding list {embeddings_arr}')
53+
5454
data_for_query.append({
5555
"chunkId": row['chunk_id'],
5656
"embeddings": embeddings_arr

0 commit comments

Comments
 (0)