Merge pull request #655 from na10xi27da/msg_buffer

消息缓冲器
This commit is contained in:
SengokuCola
2025-04-05 23:11:42 +08:00
committed by GitHub
9 changed files with 324 additions and 11 deletions

View File

@@ -162,6 +162,7 @@ class BotConfig:
emoji_chance: float = 0.2 # 发送表情包的基础概率
thinking_timeout: int = 120 # 思考时间
max_response_length: int = 1024 # 最大回复长度
message_buffer: bool = True # 消息缓冲器
ban_words = set()
ban_msgs_regex = set()
@@ -505,6 +506,8 @@ class BotConfig:
if config.INNER_VERSION in SpecifierSet(">=0.0.11"):
config.max_response_length = msg_config.get("max_response_length", config.max_response_length)
if config.INNER_VERSION in SpecifierSet(">=1.1.4"):
config.message_buffer = msg_config.get("message_buffer", config.message_buffer)
def memory(parent: dict):
memory_config = parent["memory"]