From 36ee137dba7b8778446baf0966657f5609d27e66 Mon Sep 17 00:00:00 2001 From: Kirigaya <1193466151@qq.com> Date: Mon, 7 Apr 2025 02:32:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/main-panel/chat/index.vue | 6 +---- service/tabs.json | 24 +++++++++++++++++-- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/renderer/src/components/main-panel/chat/index.vue b/renderer/src/components/main-panel/chat/index.vue index 4ca8441..6081df4 100644 --- a/renderer/src/components/main-panel/chat/index.vue +++ b/renderer/src/components/main-panel/chat/index.vue @@ -130,11 +130,7 @@ const handleSend = () => { } // 如果超出了 tabStorage.settings.contextLength, 则删除最早的消息 const loadMessages = messages.slice(-tabStorage.settings.contextLength); - userMessages.concat(loadMessages); - userMessages.push({ - role: 'assistant', - content: streamingContent.value - }); + userMessages.push(...loadMessages); const chatData = { baseURL, diff --git a/service/tabs.json b/service/tabs.json index 3bdb20b..6a19c30 100644 --- a/service/tabs.json +++ b/service/tabs.json @@ -47,6 +47,18 @@ { "role": "assistant", "content": "\nTo solve the equation \\( 5^{x} = 3125 \\), we can follow these steps:\n\n1. **Express 3125 as a Power of 5:**\n \n First, recognize that 3125 is a power of 5. Let's find the exponent:\n \\[\n 5^5 = 5 \\times 5 \\times 5 \\times 5 \\times 5 = 3125\n \\]\n \n2. **Set the Exponents Equal:**\n \n Since the bases are the same, we can set the exponents equal to each other:\n \\[\n 5^{x} = 5^{5}\n \\]\n \\[\n x = 5\n \\]\n \n3. **Final Answer:**\n \n Therefore, the solution to the equation is:\n \\[\n \\boxed{5}\n \\]" + }, + { + "role": "assistant", + "content": "要获取杭州今天的最新气温信息,你可以通过以下几种方式实时查询:\n\n1. **天气应用/网站** \n - 打开手机上的天气应用(如苹果天气、墨迹天气等),搜索“杭州”。\n - 访问中国天气网([www.weather.com.cn](http://www.weather.com.cn))或国际服务(如AccuWeather、Weather.com)。\n\n2. **搜索引擎** \n 在百度、谷歌等搜索“杭州今日天气”,结果页通常会直接显示当前气温和预报。\n\n3. **语音助手** \n 对手机说“Hey Siri”或“小爱同学,杭州今天多少度?”快速获取答案。\n\n**提示**:气温可能因城区/郊区差异略有不同,建议查看实时更新数据。如果需要更详细的天气信息(如湿度、降水概率),上述方法也可提供。\n\n(由于我无法实时联网,暂不能提供此刻的具体温度,请见谅!)" + }, + { + "role": "assistant", + "content": "你之前的提问是:“我的上一个问题是什么?” \n\n不过,由于对话的连续性限制,我无法直接回顾更早的历史记录。如果你指的是在这之前的某个问题,可以告诉我更多关键词或上下文,我会尽力帮你回忆或解答! 😊" + }, + { + "role": "assistant", + "content": "你上一个问题是: \n**“杭州今天的气温如何”** \n\n而我的回答中已说明,由于无法实时联网,建议你通过天气应用或搜索引擎获取最新数据。需要我帮你回顾其他内容吗? 😊" } ] } @@ -60,11 +72,19 @@ "messages": [ { "role": "user", - "content": "请问杭州今天的气温是多少?" + "content": "杭州今天的气温如何" }, { "role": "assistant", - "content": "\nTo solve the equation \\( 5^{x} = 3125 \\), we can follow these steps:\n\n1. **Express 3125 as a Power of 5:**\n \n First, recognize that 3125 is a power of 5. Let's find the exponent:\n \\[\n 5^5 = 5 \\times 5 \\times 5 \\times 5 \\times 5 = 3125\n \\]\n \n2. **Set the Exponents Equal:**\n \n Since the bases are the same, we can set the exponents equal to each other:\n \\[\n 5^{x} = 5^{5}\n \\]\n \\[\n x = 5\n \\]\n \n3. **Final Answer:**\n \n Therefore, the solution to the equation is:\n \\[\n \\boxed{5}\n \\]" + "content": "要获取杭州今天的最新气温信息,你可以通过以下几种方式实时查询:\n\n1. **天气应用/网站** \n - 打开手机上的天气应用(如苹果天气、墨迹天气等),搜索“杭州”。\n - 访问中国天气网([www.weather.com.cn](http://www.weather.com.cn))或国际服务(如AccuWeather、Weather.com)。\n\n2. **搜索引擎** \n 在百度、谷歌等搜索“杭州今日天气”,结果页通常会直接显示当前气温和预报。\n\n3. **语音助手** \n 对手机说“Hey Siri”或“小爱同学,杭州今天多少度?”快速获取答案。\n\n**提示**:气温可能因城区/郊区差异略有不同,建议查看实时更新数据。如果需要更详细的天气信息(如湿度、降水概率),上述方法也可提供。\n\n(由于我无法实时联网,暂不能提供此刻的具体温度,请见谅!)" + }, + { + "role": "user", + "content": "我的上一个问题是什么" + }, + { + "role": "assistant", + "content": "你上一个问题是: \n**“杭州今天的气温如何”** \n\n而我的回答中已说明,由于无法实时联网,建议你通过天气应用或搜索引擎获取最新数据。需要我帮你回顾其他内容吗? 😊" } ], "settings": {