chore: sync current WechatHookBot workspace

This commit is contained in:
2026-03-09 15:48:45 +08:00
parent 4016c1e6eb
commit 9119e2307d
195 changed files with 24438 additions and 17498 deletions

View File

@@ -0,0 +1,48 @@
# 群聊总结插件配置
[database]
# 使用与 MessageLogger 相同的数据库配置
host = "43.137.46.150"
port = 3306
user = "80012029Lz"
password = "wechat_message"
database = "wechat_message"
charset = "utf8mb4"
[api]
# AI API 配置
base_url = "https://ai.dgbmc.top/v1/chat/completions"
api_key = "sk-KF5YoN2Q8gFwq8irvoQZIsYaLNGgYjbXnfrL2t9CcV3OHN19" # 请填入你的 API Key
model = "gemini-2.5-pro"
max_tokens = 1000000
timeout = 1200
temperature = 0.7
[proxy]
# 代理配置(可选)
enabled = false
type = "socks5" # http 或 socks5
host = "38.55.107.103"
port = 53054
[behavior]
# 功能配置
enabled = true # 是否启用插件
auto_summary_enabled = true # 是否启用自动定时总结
min_messages = 2 # 最少消息数量才生成总结
max_message_length = 1500 # 单条消息最大长度(超过会分段发送)
max_messages = 2000 # 单次总结最多使用的消息条数(避免过长导致失败)
# 群聊过滤配置
enabled_groups = [ # 启用总结的群聊列表(留空表示所有群可用)
"48712602520@chatroom",
"47652853273@chatroom",
"48977668554@chatroom",
"51803330518@chatroom", # 示例群聊ID
]
disabled_groups = [ # 禁用总结的群聊列表
# "disabled_group@chatroom", # 示例禁用群聊
]
# 定时任务配置
summary_time = "09:00" # 每日总结时间24小时制

View File

@@ -613,7 +613,8 @@ class ChatRoomSummary(PluginBase):
]
appmsg_xml = "".join(appmsg_parts)
await bot._send_data_async(11214, {"to_wxid": from_wxid, "content": appmsg_xml})
# 使用新的 HTTP API 发送 XML 消息
await bot.send_xml(from_wxid, appmsg_xml)
logger.success(f"已发送聊天记录: {title}")
except Exception as e:
@@ -669,18 +670,23 @@ class ChatRoomSummary(PluginBase):
"type": "function",
"function": {
"name": "generate_summary",
"description": "仅当用户明确要求“群聊总结/今日总结/昨日总结”时调用;不要在闲聊或无总结需求时触发。",
"description": (
"生成群聊总结(今日或昨日),并发送结构化总结结果。"
"仅当用户明确要求群聊总结/今日总结/昨日总结时调用;"
"普通对话中不要触发。"
),
"parameters": {
"type": "object",
"properties": {
"time_period": {
"type": "string",
"description": "时间段,可选值:'today'(今日)或'yesterday'(昨日)",
"description": "总结时间范围today=今日yesterday=昨日。缺省建议为 yesterday。",
"enum": ["today", "yesterday"],
"default": "yesterday"
}
},
"required": []
"required": [],
"additionalProperties": False
}
}
}