1、将清单、定额excel上传到git. 初此启动服务将创建数据库文件。因数据库中包含向量数据体积庞大,采用初此启动服务创建策略

2、优化环境变量的使用和命名
This commit is contained in:
2025-09-24 10:51:41 +08:00
parent d8d32ced9a
commit 640e02f89e
150 changed files with 26 additions and 20 deletions
+4 -1
View File
@@ -11,7 +11,7 @@ import os
# 导入ExcelToSQLiteProcessor类
sys.path.append(os.getcwd())
from rag2_0.demo.create_qingdan_dinge_database import ExcelToSQLiteProcessor
from rag2_0.api.create_qingdan_dinge_database import ExcelToSQLiteProcessor, create_db
# 导入向量检索相关类
from rag2_0.tool.ModelTool import XinferenceEmbeddings
from langchain_community.vectorstores import SQLiteVSS
@@ -57,6 +57,9 @@ class QingDanDingEQueryService:
self.db_path = f"{os.getcwd()}/data/db/qingdan_ding_e_ku.db"
self.top_k = TOP_K
# 初始化数据库文件,首次将创建数据库DB
create_db()
# 初始化向量检索相关组件
self.embedding_function = XinferenceEmbeddings()