From a45724c899175d1e98e89c804ecd5b83f8da60ba Mon Sep 17 00:00:00 2001 From: pablodanswer Date: Wed, 11 Dec 2024 19:18:06 -0800 Subject: [PATCH] run black --- backend/danswer/document_index/interfaces.py | 1 + backend/danswer/document_index/vespa/index.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/danswer/document_index/interfaces.py b/backend/danswer/document_index/interfaces.py index dc6d19f9aa2..5a8c2dda29f 100644 --- a/backend/danswer/document_index/interfaces.py +++ b/backend/danswer/document_index/interfaces.py @@ -143,6 +143,7 @@ class Indexable(abc.ABC): """ Class must implement the ability to index document chunks """ + @abc.abstractmethod def index( self, diff --git a/backend/danswer/document_index/vespa/index.py b/backend/danswer/document_index/vespa/index.py index 1d8eb4e46f9..87b99cda894 100644 --- a/backend/danswer/document_index/vespa/index.py +++ b/backend/danswer/document_index/vespa/index.py @@ -326,7 +326,9 @@ class VespaIndex(DocumentIndex): if not fresh_index: # Check for existing documents, existing documents need to have all of their chunks deleted # prior to indexing as the document size (num chunks) may have shrunk - first_chunks = [chunk for chunk in cleaned_chunks if chunk.chunk_id == 0] + first_chunks = [ + chunk for chunk in cleaned_chunks if chunk.chunk_id == 0 + ] for chunk_batch in batch_generator(first_chunks, BATCH_SIZE): existing_docs.update( get_existing_documents_from_chunks(