main
HuangHai 1 week ago
parent e5c677aa37
commit a26bdde5ef

@ -19,18 +19,15 @@ WORKING_DIR = f"./output"
# 1、工作空间【知识库名称】 # 1、工作空间【知识库名称】
# 2、文档名称【不允许出现重复因为后面需要以此为条件查询】 # 2、文档名称【不允许出现重复因为后面需要以此为条件查询】
tasks = [ tasks = [
{ # 苏轼 # { # 苏轼
"workspace": "SuShi", "docx_name": "苏轼.docx", # "workspace": "SuShi", "docx_name": "苏轼.docx",
}, # },
# { # 化学 # { # 化学
# "workspace": "Chemistry", "docx_name": "Chemistry.docx", # "workspace": "Chemistry", "docx_name": "Chemistry.docx",
# }, # },
# { # 几何 { # 数学
# "workspace": "JiHe", "docx_name": "JiHe.docx", "workspace": "Math", "docx_name": "Math.docx",
# }, },
# { # 数学
# "workspace": "Math", "docx_name": "Math.docx",
# },
# { # 史记 # { # 史记
# "workspace": "ShiJi", "docx_name": "少年读史记张嘉骅.docx", # "workspace": "ShiJi", "docx_name": "少年读史记张嘉骅.docx",
# }, # },

@ -266,7 +266,9 @@
const buttons = document.querySelectorAll('button'); const buttons = document.querySelectorAll('button');
buttons.forEach(btn => btn.disabled = false); buttons.forEach(btn => btn.disabled = false);
return MathJax.typesetPromise(); MathJax.typesetPromise();
// 自动滚动到底部
answerArea.scrollTop = answerArea.scrollHeight;
}); });
} }
} }
@ -332,6 +334,8 @@
accumulatedContent += data.reply; accumulatedContent += data.reply;
answerArea.innerHTML = marked.parse(accumulatedContent, markedOptions); answerArea.innerHTML = marked.parse(accumulatedContent, markedOptions);
MathJax.typesetPromise(); MathJax.typesetPromise();
// 自动滚动到底部
answerArea.scrollTop = answerArea.scrollHeight;
} }
} catch (e) { } catch (e) {
console.log('忽略解析错误:', e); console.log('忽略解析错误:', e);

@ -198,15 +198,6 @@
</div> </div>
</div> </div>
<div class="doc-links">
<h3>知识库范围</h3>
<div class="doc-checkboxes">
<label>
<input type="radio" name="topic" value="Chemistry" checked>
化学
</label>
</div>
</div>
<button id="submitBtn" onclick="submitQuestion()"><span class="icon">💡</span>提问</button> <button id="submitBtn" onclick="submitQuestion()"><span class="icon">💡</span>提问</button>
<button id="clearBtn" onclick="clearAll()"><span class="icon">🗑️</span>清空</button> <button id="clearBtn" onclick="clearAll()"><span class="icon">🗑️</span>清空</button>
</div> </div>
@ -247,7 +238,11 @@
const buttons = document.querySelectorAll('button'); const buttons = document.querySelectorAll('button');
buttons.forEach(btn => btn.disabled = false); buttons.forEach(btn => btn.disabled = false);
return MathJax.typesetPromise(); // 自动滚动到底部
answerArea.scrollTop = answerArea.scrollHeight;
MathJax.typesetPromise();
// 自动滚动到底部
answerArea.scrollTop = answerArea.scrollHeight;
}); });
} }
} }
@ -266,7 +261,6 @@
function submitQuestion() { function submitQuestion() {
const question = document.getElementById('questionInput').value.trim(); const question = document.getElementById('questionInput').value.trim();
const answerArea = document.getElementById('answerArea'); const answerArea = document.getElementById('answerArea');
const topic = document.querySelector('input[name="topic"]:checked').value;
if (!question) { if (!question) {
alert('请输入问题!'); alert('请输入问题!');
@ -284,7 +278,7 @@
}, },
body: JSON.stringify({ body: JSON.stringify({
query: question, query: question,
topic: topic, topic: 'Chemistry',
}) })
}) })
.then(response => { .then(response => {
@ -311,6 +305,8 @@
accumulatedContent += data.reply; accumulatedContent += data.reply;
answerArea.innerHTML = marked.parse(accumulatedContent, markedOptions); answerArea.innerHTML = marked.parse(accumulatedContent, markedOptions);
MathJax.typesetPromise(); MathJax.typesetPromise();
// 自动滚动到底部
answerArea.scrollTop = answerArea.scrollHeight;
} }
} catch (e) { } catch (e) {
console.log('忽略解析错误:', e); console.log('忽略解析错误:', e);

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

@ -216,20 +216,6 @@
</div> </div>
</div> </div>
</div> </div>
<div class="doc-links">
<h3>知识库范围</h3>
<div class="doc-checkboxes">
<label>
<input type="radio" name="topic" value="Math" checked>
小学数学
</label>
<label>
<input type="radio" name="topic" value="JiHe">
几何
</label>
</div>
</div>
<button id="submitBtn" onclick="submitQuestion()"><span class="icon">💡</span>提问</button> <button id="submitBtn" onclick="submitQuestion()"><span class="icon">💡</span>提问</button>
<button id="clearBtn" onclick="clearAll()"><span class="icon">🗑️</span>清空</button> <button id="clearBtn" onclick="clearAll()"><span class="icon">🗑️</span>清空</button>
</div> </div>
@ -289,7 +275,6 @@
function submitQuestion() { function submitQuestion() {
const question = document.getElementById('questionInput').value.trim(); const question = document.getElementById('questionInput').value.trim();
const answerArea = document.getElementById('answerArea'); const answerArea = document.getElementById('answerArea');
const topic = document.querySelector('input[name="topic"]:checked').value;
if (!question) { if (!question) {
alert('请输入问题!'); alert('请输入问题!');
@ -307,7 +292,7 @@
}, },
body: JSON.stringify({ body: JSON.stringify({
query: question, query: question,
topic: topic, topic: 'Math'
}) })
}) })
.then(response => { .then(response => {
@ -334,6 +319,8 @@
accumulatedContent += data.reply; accumulatedContent += data.reply;
answerArea.innerHTML = marked.parse(accumulatedContent, markedOptions); answerArea.innerHTML = marked.parse(accumulatedContent, markedOptions);
MathJax.typesetPromise(); MathJax.typesetPromise();
// 自动滚动到底部
answerArea.scrollTop = answerArea.scrollHeight;
} }
} catch (e) { } catch (e) {
console.log('忽略解析错误:', e); console.log('忽略解析错误:', e);

@ -285,7 +285,9 @@
const buttons = document.querySelectorAll('button'); const buttons = document.querySelectorAll('button');
buttons.forEach(btn => btn.disabled = false); buttons.forEach(btn => btn.disabled = false);
return MathJax.typesetPromise(); MathJax.typesetPromise();
// 自动滚动到底部
answerArea.scrollTop = answerArea.scrollHeight;
}); });
} }
} }
@ -351,6 +353,8 @@
accumulatedContent += data.reply; accumulatedContent += data.reply;
answerArea.innerHTML = marked.parse(accumulatedContent, markedOptions); answerArea.innerHTML = marked.parse(accumulatedContent, markedOptions);
MathJax.typesetPromise(); MathJax.typesetPromise();
// 自动滚动到底部
answerArea.scrollTop = answerArea.scrollHeight;
} }
} catch (e) { } catch (e) {
console.log('忽略解析错误:', e); console.log('忽略解析错误:', e);

@ -238,7 +238,9 @@
const buttons = document.querySelectorAll('button'); const buttons = document.querySelectorAll('button');
buttons.forEach(btn => btn.disabled = false); buttons.forEach(btn => btn.disabled = false);
return MathJax.typesetPromise(); MathJax.typesetPromise();
// 自动滚动到底部
answerArea.scrollTop = answerArea.scrollHeight;
}); });
} }
} }
@ -301,6 +303,8 @@
accumulatedContent += data.reply; accumulatedContent += data.reply;
answerArea.innerHTML = marked.parse(accumulatedContent, markedOptions); answerArea.innerHTML = marked.parse(accumulatedContent, markedOptions);
MathJax.typesetPromise(); MathJax.typesetPromise();
// 自动滚动到底部
answerArea.scrollTop = answerArea.scrollHeight;
} }
} catch (e) { } catch (e) {
console.log('忽略解析错误:', e); console.log('忽略解析错误:', e);

Binary file not shown.

Binary file not shown.

@ -145,14 +145,14 @@
<div class="container"> <div class="container">
<header> <header>
<h1>【东师理想】教育大模型</h1> <h1>【东师理想】教育大模型</h1>
<p class="subtitle">教育解决方案,助力教学创新</p> <p class="subtitle">教育解决方案,助力教学创新</p>
</header> </header>
<div class="card-container"> <div class="card-container">
<div class="card"> <div class="card">
<i class="fas fa-book"></i> <i class="fas fa-book"></i>
<h3>小学数学</h3> <h3>小学数学</h3>
<p>探索小学数学知识库示例</p> <p>探索小学数学垂直模型示例</p>
<a href="Math.html" class="btn" target="_blank">进入 <i class="fas fa-arrow-right"></i></a> <a href="Math.html" class="btn" target="_blank">进入 <i class="fas fa-arrow-right"></i></a>
</div> </div>
@ -177,7 +177,6 @@
<a href="ChangChun.html" class="btn" target="_blank">进入 <i class="fas fa-arrow-right"></i></a> <a href="ChangChun.html" class="btn" target="_blank">进入 <i class="fas fa-arrow-right"></i></a>
</div> </div>
<div class="card"> <div class="card">
<i class="fas fa-flask"></i> <i class="fas fa-flask"></i>
<h3>化学专题</h3> <h3>化学专题</h3>
@ -194,7 +193,7 @@
</div> </div>
<footer> <footer>
<p>© 2023 东师理想教育大模型 | 智能教育平台</p> <p>© 2025 东师理想教育大模型 | 智慧教育平台</p>
</footer> </footer>
</div> </div>
</body> </body>

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save