From 1b1a50ab9b4dfae7007d3f904c3b5ce3a125d7dd Mon Sep 17 00:00:00 2001 From: HuangHai <10402852@qq.com> Date: Fri, 27 Jun 2025 08:45:01 +0800 Subject: [PATCH] 'commit' --- dsRag/Start.py | 5 +---- dsRag/static/1.html | 5 ----- dsRag/static/ai.html | 23 ++++++++++++++--------- 3 files changed, 15 insertions(+), 18 deletions(-) delete mode 100644 dsRag/static/1.html diff --git a/dsRag/Start.py b/dsRag/Start.py index 83cff6e0..32e0a190 100644 --- a/dsRag/Start.py +++ b/dsRag/Start.py @@ -154,10 +154,7 @@ async def generate_stream(client, milvus_pool, collection_manager, query): stream=False ) # 将返回的html代码保存成文件 - htmlStr = response.choices[0].message.content - with open("Static/1.html", "w", encoding="utf-8") as f: - f.write(htmlStr) - yield {"data": htmlStr} + yield {"data": response.choices[0].message.content} except Exception as e: yield {"data": f"生成报告时出错: {str(e)}"} finally: diff --git a/dsRag/static/1.html b/dsRag/static/1.html deleted file mode 100644 index 7b7d06aa..00000000 --- a/dsRag/static/1.html +++ /dev/null @@ -1,5 +0,0 @@ -

微积分的基本定理是什么?

- -

根据提供的材料,其中并未包含关于"微积分的基本定理"的相关信息。因此,按照回答要求第2条和第3条,在此问题不予回答。

- -

提示:当前提供的材料主要讨论的是方程的本质、列方程与解方程的原则,以及平均数的统计意义等内容,与微积分基本定理无关。如需了解微积分基本定理,建议提供相关的数学分析材料。

\ No newline at end of file diff --git a/dsRag/static/ai.html b/dsRag/static/ai.html index 3c5e54ab..a7736596 100644 --- a/dsRag/static/ai.html +++ b/dsRag/static/ai.html @@ -40,12 +40,13 @@ textarea { width: 100%; - height: 100px; + height: 40px; padding: 10px; border: 1px solid #ddd; border-radius: 4px; - resize: vertical; + resize: none; margin-bottom: 10px; + margin-right: 20px; /* 新增右侧边距 */ } button { @@ -166,9 +167,10 @@ background-color: #d0e3fa; } - #questionInput { - height: 40px; /* 固定高度 */ - resize: none; /* 禁止调整大小 */ + .input-area textarea#questionInput { + margin-right: 10px !important; + width: calc(100% - 10px); + box-sizing: border-box; } #answerArea { @@ -180,10 +182,13 @@
-

小学数学问答系统

- +
+

欢迎使用小学数学问答系统

+

请在下方输入您的问题,答案将在此处显示

+

您也可以点击"示例问题"快速体验

+
@@ -211,10 +216,10 @@