From 8778eb76b5117a3eaf2b2275ae53df947d59fd64 Mon Sep 17 00:00:00 2001 From: Jerryestt <705626108@qq.com> Date: Thu, 14 Nov 2024 19:54:21 +0800 Subject: [PATCH] =?UTF-8?q?refactor(wechatter):=20=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=9C=AA=E4=BD=BF=E7=94=A8=E7=9A=84=E5=AF=BC=E5=85=A5=E5=B9=B6?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B5=8B=E8=AF=95=E6=96=87=E4=BB=B6=E8=B7=AF?= =?UTF-8?q?=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 从 spark_chat.py 中删除了未使用的导入 DEFAULT_TOPIC 和 DEFAULT_CONVERSATION - 修复了 test_idaily.py 中的文件路径问题,使用正确的相对路径 --- tests/commands/test_idaily/test_idaily.py | 3 +-- wechatter/commands/_commands/spark_chat.py | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/commands/test_idaily/test_idaily.py b/tests/commands/test_idaily/test_idaily.py index 7bc47e1..eff7963 100644 --- a/tests/commands/test_idaily/test_idaily.py +++ b/tests/commands/test_idaily/test_idaily.py @@ -7,8 +7,7 @@ class TestTodayInHistoryCommand(unittest.TestCase): def setUp(self): with open( - # "tests/commands/test_idaily/idaily_response.json" - "idaily_response.json" + "tests/commands/test_idaily/idaily_response.json" ) as f: self.tih_response = json.load(f) self.tih_list = self.tih_response diff --git a/wechatter/commands/_commands/spark_chat.py b/wechatter/commands/_commands/spark_chat.py index 8c52a45..a21d2ec 100644 --- a/wechatter/commands/_commands/spark_chat.py +++ b/wechatter/commands/_commands/spark_chat.py @@ -3,7 +3,6 @@ from loguru import logger -from wechatter.commands._commands.openai_chat_gpt import DEFAULT_TOPIC, DEFAULT_CONVERSATION from wechatter.commands.handlers import command from wechatter.config import config from wechatter.database import (