Skip to content

Commit 423d024

Browse files
authored
get emb only if used (#278)
1 parent 6296859 commit 423d024

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)