From 66c2f3b2516227c89b5471c2dee129dc99e457b7 Mon Sep 17 00:00:00 2001 From: fynnfluegge Date: Sat, 30 Nov 2024 11:06:28 +0100 Subject: [PATCH] add todo block to vector embeddings handler --- lambda-handler/save-vector-embeddings-handler/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lambda-handler/save-vector-embeddings-handler/main.py b/lambda-handler/save-vector-embeddings-handler/main.py index 98237317..7e19b584 100644 --- a/lambda-handler/save-vector-embeddings-handler/main.py +++ b/lambda-handler/save-vector-embeddings-handler/main.py @@ -104,7 +104,6 @@ def handler(event, context): folder_path=file_path, embeddings=embeddings, ) - # If recreateIndex is set to True, recreate the index # Update any document vectors that have changed since last index creation # if recreateIndex: # metadata = head_object_from_s3(f"{embeddingsModel}_{userId}.faiss") @@ -190,6 +189,10 @@ def handler(event, context): ) for documentId, vectors in document_vectors.items(): add_vectors_to_dynamodb(documentId, vectors) + else: + # TODO in this case a document has been deleted + # delete vectors for documentId + pass except Exception as e: return {