diff --git a/src/chat/focus_chat/heartFC_chat.py b/src/chat/focus_chat/heartFC_chat.py index dd2d5374a..934991afe 100644 --- a/src/chat/focus_chat/heartFC_chat.py +++ b/src/chat/focus_chat/heartFC_chat.py @@ -462,7 +462,7 @@ class HeartFChatting: 在"兴趣"模式下,判断是否回复并生成内容。 """ - interested_rate = message_data.get("interest_value", 0.0) * self.willing_amplifier + interested_rate = (message_data.get("interest_value") or 0.0) * self.willing_amplifier self.willing_manager.setup(message_data, self.chat_stream) diff --git a/src/chat/willing/willing_manager.py b/src/chat/willing/willing_manager.py index 6c53273f5..31ea49399 100644 --- a/src/chat/willing/willing_manager.py +++ b/src/chat/willing/willing_manager.py @@ -104,7 +104,7 @@ class BaseWillingManager(ABC): is_mentioned_bot=message.get("is_mentioned", False), is_emoji=message.get("is_emoji", False), is_picid=message.get("is_picid", False), - interested_rate=message.get("interest_value", 0), + interested_rate = message.get("interest_value") or 0.0, ) def delete(self, message_id: str):