diff --git a/rag/app/resume.py b/rag/app/resume.py index 80fc322bd09..b1225e6a9ef 100644 --- a/rag/app/resume.py +++ b/rag/app/resume.py @@ -39,6 +39,8 @@ from typing import Optional import numpy as np +from common import settings + # tiktoken for long random string filtering (ref: SmartResume should_remove strategy) try: import tiktoken @@ -2485,6 +2487,9 @@ def chunk(filename, binary, tenant_id, from_page=0, to_page=100000, if callback is None: def callback(prog, msg): return None + if settings.DOC_ENGINE.lower() != "elasticsearch": + raise Exception("Resume is supported only with Elasticsearch.") + try: callback(0.1, "Starting resume parsing...")