mirror of https://github.com/Mai-with-u/MaiBot.git
合并冲突
parent
0b260dfb26
commit
181269f121
|
|
@ -295,7 +295,7 @@ class BotConfig:
|
|||
max_nicknames_in_prompt: int = 10 # Prompt 中最多注入的绰号数量
|
||||
nickname_probability_smoothing: int = 1 # 绰号加权随机选择的平滑因子
|
||||
nickname_queue_max_size: int = 100 # 绰号处理队列最大容量
|
||||
nickname_process_sleep_interval: float = 60 # 绰号处理进程休眠间隔(秒)
|
||||
nickname_process_sleep_interval: float = 5 # 绰号处理进程休眠间隔(秒)
|
||||
nickname_analysis_history_limit: int = 30 # 绰号处理可见最大上下文
|
||||
|
||||
# 模型配置
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import asyncio
|
||||
import threading
|
||||
import random
|
||||
import time
|
||||
import json
|
||||
import re
|
||||
|
|
@ -201,6 +202,10 @@ class NicknameManager:
|
|||
if not self.is_enabled:
|
||||
return
|
||||
|
||||
if random.random() > 0.9:
|
||||
logger.debug("跳过绰号分析:随机概率未命中。")
|
||||
return
|
||||
|
||||
current_chat_stream = chat_stream or anchor_message.chat_stream
|
||||
if not current_chat_stream or not current_chat_stream.group_info:
|
||||
logger.debug("跳过绰号分析:非群聊或无效的聊天流。")
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ enable_nickname_mapping = false # 绰号映射功能总开关(默认关闭,
|
|||
max_nicknames_in_prompt = 10 # Prompt 中最多注入的绰号数量(防止token数量爆炸)
|
||||
nickname_probability_smoothing = 1 # 绰号加权随机选择的平滑因子
|
||||
nickname_queue_max_size = 100 # 绰号处理队列最大容量
|
||||
nickname_process_sleep_interval = 60 # 绰号处理进程休眠间隔(秒)
|
||||
nickname_process_sleep_interval = 5 # 绰号处理进程休眠间隔(秒)
|
||||
nickname_analysis_history_limit = 30 # 绰号处理可见最大上下文
|
||||
|
||||
[memory]
|
||||
|
|
|
|||
Loading…
Reference in New Issue