修复interest_value为None的情况,确保在计算兴趣值时不会出现错误。将interest_value的默认值设置为0.0,以提高代码的健壮性。

This commit is contained in:
minecraft1024a
2025-08-13 13:44:12 +08:00
committed by Windpicker-owo
parent 1e785a117d
commit e6499e2fa7
2 changed files with 23 additions and 5 deletions

View File

@@ -117,10 +117,7 @@ class MessageRecv(Message):
self.priority_mode = "interest"
self.priority_info = None
self.interest_value: float = None # type: ignore
self.key_words = []
self.key_words_lite = []
self.interest_value: float = 0.0
def update_chat_stream(self, chat_stream: "ChatStream"):
self.chat_stream = chat_stream