# import os # BASE_DIR = os.path.dirname(os.path.abspath(__file__)) # info_data_json = os.path.join(BASE_DIR, 'data/data.json') # info_data_txt = os.path.join(BASE_DIR, 'data/data.txt') # info_faiss_archived = os.path.join(BASE_DIR, 'data/faiss_data/data') # # Neo4j # neo4j_url = "bolt://172.20.0.145:7687" # neo4j_username = "neo4j" # neo4j_password = "password" import os import json # 获取当前目录 BASE_DIR = os.path.dirname(os.path.abspath(__file__)) # 读取 config.json 配置文件 config_path = os.path.join(BASE_DIR, 'config.json') with open(config_path, 'r', encoding='utf-8') as f: config = json.load(f) # 解析路径配置 info_data_json = os.path.join(BASE_DIR, config["info_data_json"]) info_data_txt = os.path.join(BASE_DIR, config["info_data_txt"]) info_faiss_archived = os.path.join(BASE_DIR, config["info_faiss_archived"]) # 解析 Neo4j 配置 neo4j_url = config["neo4j"]["url"] neo4j_username = config["neo4j"]["username"] neo4j_password = config["neo4j"]["password"]