From f87d28394af222029b647460936847495a0be68f Mon Sep 17 00:00:00 2001 From: Fisherlen Date: Sat, 21 Mar 2026 20:12:55 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84=E5=89=8D=E7=AB=AF=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=EF=BC=9A=E5=A2=9E=E5=8A=A0=E5=AF=B9=E8=AF=9D=E6=A1=86?= =?UTF-8?q?=E5=A4=A7=E5=B0=8F=EF=BC=8C=E4=BC=98=E5=8C=96UI=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ChatBot/templates/index.html | 241 ++++++++++++++++++++++++++++++++--- 1 file changed, 222 insertions(+), 19 deletions(-) diff --git a/ChatBot/templates/index.html b/ChatBot/templates/index.html index 8f67d22..6030682 100644 --- a/ChatBot/templates/index.html +++ b/ChatBot/templates/index.html @@ -1,29 +1,232 @@ - + - Chatbot + + AI 聊天助手 -
- {% for item in history %} - {% if item.role == 'user' %} -

User: {{ item.content }}

- {% elif item.role == 'system' %} -

Bot: {{ item.content }}

- {% endif %} - {% endfor %} -
-
-
-
- -
+
+
+

🤖 AI 聊天助手

+
+ +
+ {% if not history %} +
+
💬
+

开始与 AI 助手对话吧!

+
+ {% endif %} + + {% for item in history %} + {% if item.role == 'user' %} +
+
+
{{ item.content }}
+
+ {% elif item.role == 'assistant' %} +
+
AI
+
{{ item.content }}
+
+ {% endif %} + {% endfor %} +
+ +
+
+ + +
+
+
+ + - \ No newline at end of file +