From d6f25dc9e614d5988d1bc70d35840b1545e849a9 Mon Sep 17 00:00:00 2001 From: Kastan Day Date: Tue, 7 Nov 2023 22:45:17 +0100 Subject: [PATCH] fixing readable_filename in pdf ingest --- ai_ta_backend/vector_database.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ai_ta_backend/vector_database.py b/ai_ta_backend/vector_database.py index 336c5eb5..0ea20a3c 100644 --- a/ai_ta_backend/vector_database.py +++ b/ai_ta_backend/vector_database.py @@ -532,7 +532,7 @@ def _ingest_single_pdf(self, s3_path: str, course_name: str, **kwargs): 's3_path': s3_path, 'pagenumber': page['page_number'] + 1, # +1 for human indexing 'timestamp': '', - 'readable_filename': page['readable_filename'], + 'readable_filename': kwargs['readable_filename'] if 'readable_filename' in kwargs.keys() else page['readable_filename'], 'url': url, 'base_url': base_url, } for page in pdf_pages_OCRed