main
HuangHai 4 weeks ago
parent ced814acd8
commit 1b1a50ab9b

@ -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:

@ -1,5 +0,0 @@
<h1>微积分的基本定理是什么?</h1>
<p>根据提供的材料,其中并未包含关于"微积分的基本定理"的相关信息。因此按照回答要求第2条和第3条在此问题不予回答。</p>
<p>提示:当前提供的材料主要讨论的是方程的本质、列方程与解方程的原则,以及平均数的统计意义等内容,与微积分基本定理无关。如需了解微积分基本定理,建议提供相关的数学分析材料。</p>

@ -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 @@
</head>
<body>
<div class="container">
<h1>小学数学问答系统</h1>
<div class="data-area" id="answerArea">
<!-- 回答内容将在这里显示 -->
<div style="color:#666; padding:20px; text-align:center;">
<h3 style="color:#333;">欢迎使用小学数学问答系统</h3>
<p>请在下方输入您的问题,答案将在此处显示</p>
<p>您也可以点击"示例问题"快速体验</p>
</div>
</div>
<div class="input-area">
@ -211,10 +216,10 @@
</div>
<div class="doc-links">
<h3>原稿下载</h3>
<h3>知识库</h3>
<div class="doc-checkboxes">
<label>
<input type="checkbox" name="documents" value="MATH_DATA_1">
<input type="checkbox" name="documents" checked value="MATH_DATA_1">
小学数学教学中的若干问题
</label>
<label>

Loading…
Cancel
Save