From 969b46452db15c95d0c42021d780c341882e3bfb Mon Sep 17 00:00:00 2001 From: HuangHai <10402852@qq.com> Date: Fri, 27 Jun 2025 13:48:39 +0800 Subject: [PATCH] 'commit' --- dsRag/StartEs.py | 16 ++-------------- dsRag/static/ai.html | 6 +++--- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/dsRag/StartEs.py b/dsRag/StartEs.py index 61aae144..33f56f02 100644 --- a/dsRag/StartEs.py +++ b/dsRag/StartEs.py @@ -183,18 +183,6 @@ async def generate_stream(client, es_pool, collection_manager, query, documents) logger.info("Elasticsearch连接已释放") -""" -http://10.10.21.22:8000/static/ai.html - -知识库中有的内容: -小学数学中有哪些模型? -帮我写一下 “如何理解点、线、面、体、角”的教学设计 - -知识库中没有的内容: -你知道黄海是谁吗? -""" - - class QueryRequest(BaseModel): query: str = Field(..., description="用户查询的问题") documents: List[str] = Field(..., description="用户上传的文档") @@ -225,7 +213,7 @@ async def save_to_word(request: Request): f.write(html_content) # 使用pandoc转换 - output_file = os.path.join(tempfile.gettempdir(), "小学数学问答.docx") + output_file = os.path.join(tempfile.gettempdir(), "理想大模型问答.docx") subprocess.run(['pandoc', temp_html, '-o', output_file], check=True) # 读取生成的Word文件 @@ -233,7 +221,7 @@ async def save_to_word(request: Request): stream = BytesIO(f.read()) # 返回响应 - encoded_filename = urllib.parse.quote("小学数学问答.docx") + encoded_filename = urllib.parse.quote("理想大模型问答.docx") return StreamingResponse( stream, media_type="application/vnd.openxmlformats-officedocument.wordprocessingml.document", diff --git a/dsRag/static/ai.html b/dsRag/static/ai.html index 2684e9af..0a821ef2 100644 --- a/dsRag/static/ai.html +++ b/dsRag/static/ai.html @@ -219,15 +219,15 @@

知识库范围