上线前相关环境变量的修改

This commit is contained in:
2025-11-26 10:49:54 +08:00
parent c97e96c620
commit 46f756428e
16 changed files with 26 additions and 35 deletions
+18 -18
View File
@@ -1,27 +1,27 @@
OPENAI_API_BASE=https://api.siliconflow.cn/v1/ OPENAI_API_BASE=https://api.siliconflow.cn/v1/
MODEL_NAME=deepseek-ai/DeepSeek-V3 MODEL_NAME=deepseek-ai/DeepSeek-V3
RERANKER_BASE_URL=http://10.1.16.39:9995 # RERANKER_BASE_URL=http://10.1.16.39:9995
RERANKER_MODEL_NAME=bge-reranker-v2-m3 # RERANKER_MODEL_NAME=bge-reranker-v2-m3
RERANKER_API_KEY=test # RERANKER_API_KEY=test
EMBEDDING_BASE_URL=http://10.1.16.39:9995 # EMBEDDING_BASE_URL=http://10.1.16.39:9995
EMBEDDING_MODEL_NAME=bge-m3 # EMBEDDING_MODEL_NAME=bge-m3
EMBEDDING_API_KEY=test # EMBEDDING_API_KEY=test
DIFY_BSAE_URL=http://10.1.16.39/v1 # DIFY_BSAE_URL=http://10.1.16.39/v1
DIFY_APP_KEY=app-CPoOMaGDsLRPAe9TW7Xjhszy # DIFY_APP_KEY=app-CPoOMaGDsLRPAe9TW7Xjhszy
DIFY_DATASET_KEY=dataset-skLjmPVonjHo119OWNf3kAmY # DIFY_DATASET_KEY=dataset-skLjmPVonjHo119OWNf3kAmY
DIFY_PG_HOST = 10.1.16.39 # DIFY_PG_HOST = 10.1.16.39
DIFY_PG_PORT = 5432 # DIFY_PG_PORT = 5432
DIFY_PG_USER = postgres # DIFY_PG_USER = postgres
DIFY_PG_PASSWORD = difyai123456 # DIFY_PG_PASSWORD = difyai123456
DIFY_PG_DATABASE = dify # DIFY_PG_DATABASE = dify
ENABLE_LANGFUSE=true # ENABLE_LANGFUSE=true
LANGFUSE_PUBLIC_KEY=pk-lf-4e9b7cbe-528c-4697-b73c-33257a60072c # LANGFUSE_PUBLIC_KEY=pk-lf-4e9b7cbe-528c-4697-b73c-33257a60072c
LANGFUSE_SECRET_KEY=sk-lf-cd8a78c5-2538-455e-a85a-87b6e1aa69d0 # LANGFUSE_SECRET_KEY=sk-lf-cd8a78c5-2538-455e-a85a-87b6e1aa69d0
LANGFUSE_HOST=http://10.1.6.34:3000 # LANGFUSE_HOST=http://10.1.6.34:3000
+8 -2
View File
@@ -10,7 +10,10 @@
"request": "launch", "request": "launch",
"program": "${file}", "program": "${file}",
"console": "integratedTerminal", "console": "integratedTerminal",
"justMyCode": true "justMyCode": true,
"env": {
"PYTHONPATH": "${workspaceFolder}"
}
}, },
{ {
"name": "IntentRecognition", "name": "IntentRecognition",
@@ -18,7 +21,10 @@
"request": "launch", "request": "launch",
"program": "${workspaceFolder}/rag2_0/demo/intent_recognition_example.py", "program": "${workspaceFolder}/rag2_0/demo/intent_recognition_example.py",
"console": "integratedTerminal", "console": "integratedTerminal",
"justMyCode": true "justMyCode": true,
"env": {
"PYTHONPATH": "${workspaceFolder}"
}
} }
] ]
} }
-1
View File
@@ -29,7 +29,6 @@ def main(query: str) -> dict:
import sys import sys
sys.path.append(os.getcwd())
from rag2_0.dify.DifyQueryRetrieval import DifyQueryRetrieval from rag2_0.dify.DifyQueryRetrieval import DifyQueryRetrieval
# 定义数据库路径 # 定义数据库路径
-1
View File
@@ -18,7 +18,6 @@ import logging
load_dotenv() load_dotenv()
import sys import sys
sys.path.append(os.getcwd())
from rag2_0.dify.DifyQueryRetrieval import DifyQueryRetrieval from rag2_0.dify.DifyQueryRetrieval import DifyQueryRetrieval
# 确保日志目录存在 # 确保日志目录存在
@@ -5,7 +5,6 @@ import pandas as pd
from openpyxl import load_workbook from openpyxl import load_workbook
import logging import logging
import numpy as np import numpy as np
sys.path.append(os.getcwd())
from rag2_0.tool.ModelTool import XinferenceEmbeddings from rag2_0.tool.ModelTool import XinferenceEmbeddings
from langchain_community.vectorstores import SQLiteVSS from langchain_community.vectorstores import SQLiteVSS
-1
View File
@@ -15,7 +15,6 @@ import logging
load_dotenv() load_dotenv()
import sys import sys
sys.path.append(os.getcwd())
from rag2_0.intent_recognition import AsyncIntentRecognizer from rag2_0.intent_recognition import AsyncIntentRecognizer
# 确保日志目录存在 # 确保日志目录存在
-1
View File
@@ -10,7 +10,6 @@ import sys
import os import os
# 导入ExcelToSQLiteProcessor类 # 导入ExcelToSQLiteProcessor类
sys.path.append(os.getcwd())
from rag2_0.api.create_qingdan_dinge_database import ExcelToSQLiteProcessor, create_db from rag2_0.api.create_qingdan_dinge_database import ExcelToSQLiteProcessor, create_db
# 导入向量检索相关类 # 导入向量检索相关类
from rag2_0.tool.ModelTool import XinferenceEmbeddings from rag2_0.tool.ModelTool import XinferenceEmbeddings
-2
View File
@@ -18,8 +18,6 @@ from tqdm import tqdm
import glob import glob
import shutil import shutil
# 将项目根目录添加到Python路径
sys.path.append(os.getcwd())
from rag2_0.tool.ModelTool import OpenAiLLM from rag2_0.tool.ModelTool import OpenAiLLM
load_dotenv() load_dotenv()
@@ -20,7 +20,6 @@ import argparse
from typing import List, Dict, Any from typing import List, Dict, Any
from langchain.output_parsers import PydanticOutputParser from langchain.output_parsers import PydanticOutputParser
from pydantic import BaseModel, Field from pydantic import BaseModel, Field
sys.path.append(os.getcwd())
from rag2_0.intent_recognition import AsyncIntentRecognizer from rag2_0.intent_recognition import AsyncIntentRecognizer
from rag2_0.dify.DifyQueryRetrieval import DifyQueryRetrieval from rag2_0.dify.DifyQueryRetrieval import DifyQueryRetrieval
from rag2_0.intent_recognition.DataModels import Classification from rag2_0.intent_recognition.DataModels import Classification
-1
View File
@@ -10,7 +10,6 @@ import os
import json import json
from dotenv import load_dotenv from dotenv import load_dotenv
import sys import sys
sys.path.append(os.getcwd())
from rag2_0.intent_recognition import ProfessionalNounVectorizer from rag2_0.intent_recognition import ProfessionalNounVectorizer
import logging import logging
-1
View File
@@ -15,7 +15,6 @@ from datetime import datetime
import os import os
from langchain_core.output_parsers import JsonOutputParser from langchain_core.output_parsers import JsonOutputParser
sys.path.append(os.getcwd())
from rag2_0.dify.dify_client import ChatClient from rag2_0.dify.dify_client import ChatClient
from rag2_0.tool.ModelTool import OpenAiLLM from rag2_0.tool.ModelTool import OpenAiLLM
from rag2_0.dify.dify_tool import DifyTool from rag2_0.dify.dify_tool import DifyTool
-1
View File
@@ -6,7 +6,6 @@ import logging
import time import time
import asyncio import asyncio
import httpx import httpx
sys.path.append(os.getcwd())
from rag2_0.dify.dify_client.client import DifyClient, KnowledgeBaseClient from rag2_0.dify.dify_client.client import DifyClient, KnowledgeBaseClient
from rag2_0.tool.ModelTool import XinferenceReRankerModel from rag2_0.tool.ModelTool import XinferenceReRankerModel
@@ -5,7 +5,6 @@ import sys
from dotenv import load_dotenv from dotenv import load_dotenv
load_dotenv() load_dotenv()
sys.path.append(os.getcwd())
from rag2_0.dify.dify_client import DifyApi from rag2_0.dify.dify_client import DifyApi
-1
View File
@@ -17,7 +17,6 @@ logging.basicConfig(
] ]
) )
sys.path.append(os.getcwd())
import rag2_0.dify.dify_client.dify_api as DifyApi import rag2_0.dify.dify_client.dify_api as DifyApi
import pandas as pd import pandas as pd
-1
View File
@@ -6,7 +6,6 @@ import json
from concurrent.futures import ThreadPoolExecutor, as_completed from concurrent.futures import ThreadPoolExecutor, as_completed
import sys import sys
sys.path.append(os.getcwd())
from rag2_0.dify.dify_client import ChatClient from rag2_0.dify.dify_client import ChatClient
from pydantic import BaseModel, Field from pydantic import BaseModel, Field
from langchain.output_parsers import PydanticOutputParser from langchain.output_parsers import PydanticOutputParser
-1
View File
@@ -6,7 +6,6 @@ import pandas as pd
import sys import sys
sys.path.append(os.getcwd())
from rag2_0.dify.dify_tool import DifyTool from rag2_0.dify.dify_tool import DifyTool
import requests import requests