Merged in feature/reimbursement-primary-optimizization (pull request #428)

Fix load_embeddings()

* move datetime_str function to string_utils module

* enhance load_embeddings to create directory structure and handle download errors

* Merged main into feature/reimbursement-primary-optimizization


Approved-by: Katon Minhas
This commit is contained in:
Alex Galarce
2025-03-04 22:08:16 +00:00
parent f7ba7f45e5
commit 2f96963162
3 changed files with 22 additions and 8 deletions
@@ -1,3 +1,4 @@
from datetime import datetime
import json
import re
import warnings
@@ -323,3 +324,7 @@ def get_exhibit_chunk(text_dict: dict,
- It is important that `exhibit_page` exists as a key in the `exhibit_chunk_mapping` dictionary and corresponds to the starting page of an exhibit.
"""
return '\n'.join([page_text for page_num, page_text in text_dict.items() if exhibit_chunk_mapping[page_num] == exhibit_page])
def datetime_str():
return datetime.now().strftime("[%Y-%m-%d %H:%M:%S]")