更新 filename_proceess_and_kgquery.py

filename_proceess_and_kgquery.py里面配置信息统一从app.py导入
This commit is contained in:
Defeng 2026-07-08 09:09:30 +08:00
parent 2ceb6dbaf5
commit ca08759825

View File

@ -13,6 +13,7 @@ import json
from modelsAPI.model_api import OpenaiAPI
from openai import OpenAI
from typing import Dict, List, Any
from config import TREE_JSON_PATH
app = FastAPI(title="PDF Upload Service")
logging.basicConfig(level=logging.INFO, format="%(asctime)s | %(levelname)s | %(name)s | %(message)s")
@ -540,8 +541,8 @@ def fetch_graph_sample1(driver):
# 文件名处理方法
# =============================
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
TREE_JSON_PATH = os.path.join(BASE_DIR, "tree_data.json")
# BASE_DIR = os.path.dirname(os.path.abspath(__file__))
# TREE_JSON_PATH = os.path.join(BASE_DIR, "tree_data.json")
def _load_tree_data() -> Dict: