This commit is contained in:
UnCLAS-Prommer
2025-07-20 18:14:53 +08:00
parent 20142d1cdb
commit f2c901bc98
9 changed files with 47 additions and 46 deletions

View File

@@ -112,7 +112,7 @@ class HeartFCMessageReceiver:
# subheartflow.add_message_to_normal_chat_cache(message, interested_rate, is_mentioned)
chat_mood = mood_manager.get_mood_by_chat_id(subheartflow.chat_id) # type: ignore
chat_mood = mood_manager.get_mood_by_chat_id(subheartflow.chat_id)
asyncio.create_task(chat_mood.update_mood_by_message(message, interested_rate))
# 3. 日志记录

View File

@@ -494,10 +494,10 @@ class MessageSending(MessageProcessBase):
# ) -> "MessageSending":
# """从思考状态消息创建发送状态消息"""
# return cls(
# message_id=thinking.message_info.message_id, # type: ignore
# message_id=thinking.message_info.message_id,
# chat_stream=thinking.chat_stream,
# message_segment=message_segment,
# bot_user_info=thinking.message_info.user_info, # type: ignore
# bot_user_info=thinking.message_info.user_info,
# reply=thinking.reply,
# is_head=is_head,
# is_emoji=is_emoji,

View File

@@ -2348,7 +2348,7 @@ class AsyncStatisticOutputTask(AsyncTask):
@staticmethod
def _format_model_classified_stat(stats: Dict[str, Any]) -> str:
return StatisticOutputTask._format_model_classified_stat(stats) # type: ignore
return StatisticOutputTask._format_model_classified_stat(stats)
def _format_chat_stat(self, stats: Dict[str, Any]) -> str:
return StatisticOutputTask._format_chat_stat(self, stats) # type: ignore

View File

@@ -285,7 +285,7 @@ def random_remove_punctuation(text: str) -> str:
continue
elif char == "":
rand = random.random()
if rand < 0.25: # 5%概率删除逗号
if rand < 0.05: # 5%概率删除逗号
continue
elif rand < 0.25: # 20%概率把逗号变成空格
result += " "
@@ -628,7 +628,7 @@ def get_chat_type_and_target_info(chat_id: str) -> Tuple[bool, Optional[Dict]]:
elif chat_stream.user_info: # It's a private chat
is_group_chat = False
user_info = chat_stream.user_info
platform: str = chat_stream.platform # type: ignore
platform: str = chat_stream.platform
user_id: str = user_info.user_id # type: ignore
# Initialize target_info with basic info

View File

@@ -94,7 +94,7 @@ class BaseWillingManager(ABC):
def setup(self, message: dict, chat: ChatStream):
person_id = PersonInfoManager.get_person_id(chat.platform, chat.user_info.user_id) # type: ignore
self.ongoing_messages[message.get("message_id", "")] = WillingInfo( # type: ignore
self.ongoing_messages[message.get("message_id", "")] = WillingInfo(
message=message,
chat=chat,
person_info_manager=get_person_info_manager(),