diff --git a/dsRag/Config/Config.py b/dsRag/Config/Config.py index 9ce5b393..4206b5aa 100644 --- a/dsRag/Config/Config.py +++ b/dsRag/Config/Config.py @@ -7,7 +7,8 @@ MYSQL_DB_NAME = "base_db" # Elasticsearch配置 ES_CONFIG = { - "hosts": "https://10.10.14.206:9200", + # "hosts": "https://10.10.14.206:9200", + "hosts": "https://127.0.0.1:9200", "basic_auth": ("elastic", "jv9h8uwRrRxmDi1dq6u8"), "verify_certs": False, "ssl_show_warn": False, @@ -25,4 +26,4 @@ JIEBA_CUSTOM_WORDS = ['文言虚词', '花呗'] # 腾讯 AI Lab 中文词向量模型的路径 MODEL_PATH = "D:/Tencent_AILab_ChineseEmbedding/Tencent_AILab_ChineseEmbedding.txt" # 加载词向量模型时限制的词汇数量 -MODEL_LIMIT = 10000 \ No newline at end of file +MODEL_LIMIT = 10000 diff --git a/dsRag/Config/__pycache__/Config.cpython-310.pyc b/dsRag/Config/__pycache__/Config.cpython-310.pyc index e4ccb80b..d336c847 100644 Binary files a/dsRag/Config/__pycache__/Config.cpython-310.pyc and b/dsRag/Config/__pycache__/Config.cpython-310.pyc differ diff --git a/dsRag/Start.py b/dsRag/Start.py index a762b932..4d7d8fe1 100644 --- a/dsRag/Start.py +++ b/dsRag/Start.py @@ -15,6 +15,8 @@ from pydantic import BaseModel, Field from starlette.responses import StreamingResponse from Config.Config import ES_CONFIG +import warnings +from elasticsearch import Elasticsearch from Util.ALiYunUtil import ALiYunUtil from Util.EsSearchUtil import EsSearchUtil @@ -49,6 +51,10 @@ def html_to_word_pandoc(html_file, output_file): async def lifespan(app: FastAPI): # 初始化阿里云大模型工具 app.state.aliyun_util = ALiYunUtil() + + # 抑制HTTPS相关警告 + warnings.filterwarnings('ignore', message='Connecting to .* using TLS with verify_certs=False is insecure') + warnings.filterwarnings('ignore', message='Unverified HTTPS request is being made to host') yield diff --git a/dsRag/requirements.txt b/dsRag/requirements.txt deleted file mode 100644 index 06134e75..00000000 Binary files a/dsRag/requirements.txt and /dev/null differ