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

@@ -71,7 +71,7 @@ class ActionModifier:
message_list_before_now_half = get_raw_msg_before_timestamp_with_chat(
chat_id=self.chat_stream.stream_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), 10),
)
chat_content = build_readable_messages(
message_list_before_now_half,