feat:移除willing_amlifier,简化活跃度配置
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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}")
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user