feat:添加激活和改写的最大上下文限制,修剪planner长度

This commit is contained in:
SengokuCola
2025-07-13 20:45:21 +08:00
parent 7d193fe37b
commit 11bef44901
7 changed files with 36 additions and 32 deletions

View File

@@ -280,7 +280,7 @@ class DefaultReplyer:
# 加权随机选择一个模型配置
selected_model_config = self._select_weighted_model_config()
logger.info(
f"{self.log_prefix} 使用模型配置进行重写: {selected_model_config.get('model_name', 'N/A')} (权重: {selected_model_config.get('weight', 1.0)})"
f"{self.log_prefix} 使用模型配置进行重写: {selected_model_config.get('name', 'N/A')} (权重: {selected_model_config.get('weight', 1.0)})"
)
express_model = LLMRequest(
@@ -797,7 +797,7 @@ class DefaultReplyer:
message_list_before_now_half = get_raw_msg_before_timestamp_with_chat(
chat_id=chat_id,
timestamp=time.time(),
limit=int(global_config.chat.max_context_size * 0.5),
limit=min(int(global_config.chat.max_context_size * 0.33), 15),
)
chat_talking_prompt_half = build_readable_messages(
message_list_before_now_half,