4 Commits

Author SHA1 Message Date
yshtcn
ae4aa84f1e 调整关键词响应顺序 2025-03-04 21:53:14 +08:00
yshtcn
8b7ec5619d 调整:将程序相关的问题放在前面 2025-03-04 21:51:59 +08:00
yshtcn
5bdc6b32cf chore: 从git中移除dist目录并添加到gitignore 2025-03-04 21:49:53 +08:00
yshtcn
f1486ab687 更新:添加新的prompt.txt和重新打包的exe文件 2025-03-04 21:47:27 +08:00
3 changed files with 76 additions and 6 deletions

52
LiquidTempLab.spec Normal file
View File

@@ -0,0 +1,52 @@
# -*- mode: python ; coding: utf-8 -*-
import os
block_cipher = None
a = Analysis(
['server.py'],
pathex=[],
binaries=[],
datas=[
('chat.html', '.'),
('LiquidTempLab.html', '.'),
('logo.webp', '.'),
('Show.png', '.'),
('deepseek.ico', '.')
],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False,
)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='LiquidTempLab',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
icon=os.path.abspath('deepseek.ico')
)

View File

@@ -402,9 +402,9 @@
const modalImage = document.getElementById('modalImage');
// 预设的AI回复内容
const aiResponses = {
'实验': `为了直观展示热水和冷牛奶的温度变化,我将使用折线图来呈现数据。以下是温度随时间变化的折线图:<div class="image-container"><img src="Show.png" alt="Show"></div>热水温度变化从60℃开始每分钟逐渐下降最终在第7分钟降至44℃。\n冷牛奶温度变化从10℃开始每分钟逐渐上升最终在第7分钟达到44℃。\n在第7分钟时热水和冷牛奶的温度达到平衡均为44℃。`,
'工具': `当然可以我将为你编写一个使用HTML5和JavaScript制作的简单工具。我会在左边展示折线图右边记录温度请稍等<div class="code-block"><pre id="codeContent"></pre></div><a href="LiquidTempLab.html" class="preview-button" target="_blank">点击查看效果</a>`
const aiResponses = {
'程序': `当然可以我将为你编写一个使用HTML5和JavaScript制作的简单工具。我会在左边展示折线图右边记录温度请稍等<div class="code-block"><pre id="codeContent"></pre></div><a href="LiquidTempLab.html" class="preview-button" target="_blank">点击查看效果</a>`,
'实验': `为了直观展示热水和冷牛奶的温度变化,我将使用折线图来呈现数据。以下是温度随时间变化的折线图:<div class="image-container"><img src="Show.png" alt="Show"></div>热水温度变化从60℃开始每分钟逐渐下降最终在第7分钟降至44℃。\n冷牛奶温度变化从10℃开始每分钟逐渐上升最终在第7分钟达到44℃。\n在第7分钟时热水和冷牛奶的温度达到平衡均为44℃。`
};
// 源代码内容变量声明
@@ -647,10 +647,10 @@
}
function getAIResponse(userMessage) {
if (userMessage.includes('实验')) {
if (userMessage.includes('程序')) {
return aiResponses['程序'];
} else if (userMessage.includes('实验')) {
return aiResponses['实验'];
} else if (userMessage.includes('工具')) {
return aiResponses['工具'];
}
return '我收到了你的消息,正在处理中...';
}

18
prompt.txt Normal file
View File

@@ -0,0 +1,18 @@
第一个问题:
```
老师让我们做了一个温度变化实验,我把冷牛奶放在热水里面加热,分别记录热水和冷牛奶温度变化情况,每分钟记录一次,记录结果如下:
初始温度为热水60℃冷牛奶10℃。每分钟记录的温度变化如下
第1分钟热水57℃冷牛奶20℃
第2分钟热水53℃冷牛奶27℃
第3分钟热水50℃冷牛奶32℃
第4分钟热水49℃冷牛奶37℃
第5分钟热水47℃冷牛奶40℃
第6分钟热水45℃冷牛奶42℃
第7分钟热水44℃冷牛奶44℃
这些数字看起来好复杂啊,你能帮我画一个折线图吗?这样我就能更清楚地看到温度是怎么变化的了!
```
第二个问题:
```
我想试试用其他东西做这个实验,但是记录温度好麻烦啊。你能帮我做一个程序吗?最好能自动画出折线图,这样我就不用自己画了!
```