feat:移除willing_amlifier,简化活跃度配置

This commit is contained in:
SengokuCola
2025-08-08 22:54:40 +08:00
parent 721546fff9
commit 59ac6713b1
6 changed files with 86 additions and 70 deletions

View File

@@ -700,7 +700,7 @@ class HeartFChatting:
"兴趣"模式下,判断是否回复并生成内容。
"""
interested_rate = (message_data.get("interest_value") or 0.0) * global_config.chat.willing_amplifier
interested_rate = message_data.get("interest_value") or 0.0
self.willing_manager.setup(message_data, self.chat_stream)

View File

@@ -261,9 +261,9 @@ class ExpressionSelector:
# 4. 调用LLM
try:
start_time = time.time()
# start_time = time.time()
content, (reasoning_content, model_name, _) = await self.llm_model.generate_response_async(prompt=prompt)
logger.info(f"LLM请求时间: {model_name} {time.time() - start_time} \n{prompt}")
# logger.info(f"LLM请求时间: {model_name} {time.time() - start_time} \n{prompt}")
# logger.info(f"模型名称: {model_name}")
# logger.info(f"LLM返回结果: {content}")

View File

@@ -21,7 +21,6 @@ class ClassicalWillingManager(BaseWillingManager):
self._decay_task = asyncio.create_task(self._decay_reply_willing())
async def get_reply_probability(self, message_id):
# sourcery skip: inline-immediately-returned-variable
willing_info = self.ongoing_messages[message_id]
chat_id = willing_info.chat_id
current_willing = self.chat_reply_willing.get(chat_id, 0)
@@ -32,8 +31,7 @@ class ClassicalWillingManager(BaseWillingManager):
# print(f"[{chat_id}] 兴趣值: {interested_rate}")
if interested_rate > 0.2:
current_willing += interested_rate - 0.2
current_willing += interested_rate
if willing_info.is_mentioned_bot and global_config.chat.mentioned_bot_inevitable_reply and current_willing < 2:
current_willing += 1 if current_willing < 1.0 else 0.2