From e0acf3d18d1a53795541a2ef034548db79a5f22f Mon Sep 17 00:00:00 2001 From: Tian jianyong <11429339@qq.com> Date: Wed, 24 Dec 2025 18:45:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B9=E7=9B=AE=E7=9B=AE?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-fastapi-backend/utils/static_qa_service.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ruoyi-fastapi-backend/utils/static_qa_service.py b/ruoyi-fastapi-backend/utils/static_qa_service.py index edca59a..a341400 100644 --- a/ruoyi-fastapi-backend/utils/static_qa_service.py +++ b/ruoyi-fastapi-backend/utils/static_qa_service.py @@ -7,8 +7,10 @@ from .match_service import get_match_service class StaticQAService: def __init__(self, config_path: str = None): if config_path is None: - current_dir = os.path.dirname(os.path.abspath(__file__)) - config_path = os.path.join(os.path.dirname(os.path.dirname(current_dir)), 'config', 'static_qa.json') + config_path = os.environ.get( + 'STATIC_QA_CONFIG_PATH', + os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))), 'config', 'static_qa.json') + ) self.config_path = config_path self.match_service = get_match_service()