mirror of
https://github.com/Nezumi-2711/astrbot_plugin_qq_group_daily_analysis.git
synced 2026-09-22 13:38:43 +00:00
193 lines
12 KiB
JSON
193 lines
12 KiB
JSON
{
|
|
"enabled_groups": {
|
|
"type": "list",
|
|
"description": "启用分析功能的QQ群列表",
|
|
"default": [],
|
|
"hint": "填入允许使用分析功能的QQ群号",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"max_messages": {
|
|
"type": "int",
|
|
"description": "单次分析的获取最大消息条数基准",
|
|
"default": 1000,
|
|
"hint": "单次分析的获取最大消息条数基准值,如果当天群聊消息过多,已经获取到足够的消息(达到 max_messages),停止获取,获取到的消息数量是最新一次获取到的超过 max_messages 的消息数量,建议500-2000"
|
|
},
|
|
"analysis_days": {
|
|
"type": "int",
|
|
"description": "默认分析天数",
|
|
"default": 1,
|
|
"hint": "默认分析最近几天的消息,建议1-7天"
|
|
},
|
|
"auto_analysis_time": {
|
|
"type": "string",
|
|
"description": "自动分析时间",
|
|
"default": "09:00",
|
|
"hint": "每日自动分析的时间,格式HH:MM"
|
|
},
|
|
"enable_auto_analysis": {
|
|
"type": "bool",
|
|
"description": "启用定时自动分析",
|
|
"default": false,
|
|
"hint": "是否在指定时间自动进行群聊分析,启用需要填写下面的机器人QQ号,并且确保群聊号在 enabled_groups 配置中,否则获取不到实例,不会自动分析"
|
|
},
|
|
"bot_qq_id": {
|
|
"type": "string",
|
|
"description": "机器人QQ号",
|
|
"default": "",
|
|
"hint": "用于自动分析的机器人QQ号,填写后可启用自动分析功能"
|
|
},
|
|
"enable_user_card": {
|
|
"type": "bool",
|
|
"description": "使用用户群名片",
|
|
"default": false,
|
|
"hint": "在分析中优先使用用户的群名片作为昵称显示"
|
|
},
|
|
"output_format": {
|
|
"type": "string",
|
|
"description": "输出格式",
|
|
"default": "image",
|
|
"hint": "分析报告的输出格式:image(图片)、text(文本)、pdf(PDF文件)。使用 PDF 需要额外配置,根据文件中的 PDF_功能说明.md 进行配置"
|
|
},
|
|
|
|
"min_messages_threshold": {
|
|
"type": "int",
|
|
"description": "最小消息数阈值",
|
|
"default": 50,
|
|
"hint": "进行分析所需的最小消息数量"
|
|
},
|
|
"topic_analysis_enabled": {
|
|
"type": "bool",
|
|
"description": "启用话题分析",
|
|
"default": true,
|
|
"hint": "是否使用LLM进行智能话题分析"
|
|
},
|
|
"user_title_analysis_enabled": {
|
|
"type": "bool",
|
|
"description": "启用用户称号分析",
|
|
"default": true,
|
|
"hint": "是否使用LLM进行用户称号分析"
|
|
},
|
|
"golden_quote_analysis_enabled": {
|
|
"type": "bool",
|
|
"description": "启用金句分析",
|
|
"default": true,
|
|
"hint": "是否使用LLM进行金句分析"
|
|
},
|
|
"max_topics": {
|
|
"type": "int",
|
|
"description": "最大话题数量",
|
|
"default": 5,
|
|
"hint": "分析报告中显示的最大话题数量,依赖于 LLM 输出的格式化信息质量,模型越好结果越好,可能出现数量不匹配。"
|
|
},
|
|
"max_user_titles": {
|
|
"type": "int",
|
|
"description": "最大用户称号数量",
|
|
"default": 8,
|
|
"hint": "分析报告中显示的最大用户称号数量,依赖于 LLM 输出的格式化信息质量,模型越好结果越好,可能出现数量不匹配。"
|
|
},
|
|
"max_golden_quotes": {
|
|
"type": "int",
|
|
"description": "最大金句数量",
|
|
"default": 5,
|
|
"hint": "分析报告中显示的最大金句数量,依赖于 LLM 输出的格式化信息质量,模型越好结果越好,可能出现数量不匹配。"
|
|
},
|
|
"max_query_rounds": {
|
|
"type": "int",
|
|
"description": "最大消息平台历史消息查询轮数",
|
|
"default": 15,
|
|
"hint": "有时候平台接口返回的历史消息不完整,导致获取的消息数量不足,可以适当增加查询轮数以获取更多消息,但会增加请求时间和资源消耗。"
|
|
},
|
|
"llm_timeout": {
|
|
"type": "int",
|
|
"description": "LLM 请求超时时间(秒)",
|
|
"default": 100,
|
|
"hint": "LLM 单次请求的超时时间,单位秒。可根据模型响应速度适当调整,增大可减少超时失败,但会占用更多等待时间,思考模型可以根据情况进行调大。"
|
|
},
|
|
"llm_retries": {
|
|
"type": "int",
|
|
"description": "LLM 请求重试次数",
|
|
"default": 2,
|
|
"hint": "当请求超时或失败时自动重试的次数,建议设置为1~3之间。"
|
|
},
|
|
"llm_backoff": {
|
|
"type": "int",
|
|
"description": "LLM 请求重试退避基值(秒)",
|
|
"default": 2,
|
|
"hint": "重试之间的基准等待时间(秒),实际等待时间为基值乘以尝试次数。"
|
|
},
|
|
"custom_api_key": {
|
|
"type": "string",
|
|
"description": "自定义 LLM 服务 API Key (选填)",
|
|
"default": "",
|
|
"hint": "若使用自建或第三方的 LLM 服务,可在此填写 API Key;留空则使用 Astrbot 统一内置提供商。"
|
|
},
|
|
"custom_api_base_url": {
|
|
"type": "string",
|
|
"description": "自定义 LLM 服务 Base URL (选填)",
|
|
"default": "",
|
|
"hint": "自定义 LLM 服务的基础请求地址,例如 https://openrouter.ai/api/v1/chat/completions 。留空则使用 Astrbot 统一内置提供商。"
|
|
},
|
|
"custom_model_name": {
|
|
"type": "string",
|
|
"description": "自定义 LLM 模型名称 (选填)",
|
|
"default": "",
|
|
"hint": "自定义服务所使用的模型名称,例如 gpt-4 、deepseek/deepseek-r1:free 或自定义模型标识,由于自定义情况复杂,无法给出有效的参数参考,需要根据实际情况例如日志报错判断。留空则使用 Astrbot 统一内置提供商。"
|
|
},
|
|
"pdf_output_dir": {
|
|
"type": "string",
|
|
"description": "PDF输出目录",
|
|
"default": "data/plugins/astrbot-qq-group-daily-analysis/reports",
|
|
"hint": "PDF报告文件的保存目录"
|
|
},
|
|
"pdf_filename_format": {
|
|
"type": "string",
|
|
"description": "PDF文件名格式",
|
|
"default": "群聊分析报告_{group_id}_{date}.pdf",
|
|
"hint": "PDF文件名格式,支持变量:{group_id}(群号)、{date}(日期)"
|
|
},
|
|
"topic_analysis_prompts": {
|
|
"description": "话题分析提示词模板",
|
|
"type": "object",
|
|
"hint": "选择不同的话题分析风格",
|
|
"items": {
|
|
"default": {
|
|
"description": "默认话题分析提示词",
|
|
"type": "text",
|
|
"editor_mode": true,
|
|
"editor_language": "markdown",
|
|
"default": "你是一个帮我进行群聊信息总结的助手,生成总结内容时,你需要严格遵守下面的几个准则:\n请分析接下来提供的群聊记录,提取出最多{max_topics}个主要话题。\n\n对于每个话题,请提供:\n1. 话题名称(突出主题内容,尽量简明扼要)\n2. 主要参与者(最多5人)\n3. 话题详细描述(包含关键信息和结论)\n\n注意:\n- 对于比较有价值的点,稍微用一两句话详细讲讲,比如不要生成 \"Nolan 和 SOV 讨论了 galgame 中关于性符号的衍生情况\" 这种宽泛的内容,而是生成更加具体的讨论内容,让其他人只看这个消息就能知道讨论中有价值的,有营养的信息。\n- 对于其中的部分信息,你需要特意提到主题施加的主体是谁,是哪个群友做了什么事情,而不要直接生成和群友没有关系的语句。\n- 对于每一条总结,尽量讲清楚前因后果,以及话题的结论,是什么,为什么,怎么做,如果用户没有讲到细节,则可以不用这么做。\n\n群聊记录:\n{messages_text}\n\n重要:必须返回标准JSON格式,严格遵守以下规则:\n1. 只使用英文双引号 \\\" 不要使用中文引号 \\\" \\\"\n2. 字符串内容中的引号必须转义为 \\\\\\\"\n3. 多个对象之间用逗号分隔\n4. 数组元素之间用逗号分隔\n5. 不要在JSON外添加任何文字说明\n6. 描述内容避免使用特殊符号,用普通文字表达\n\n请严格按照以下JSON格式返回,确保可以被标准JSON解析器解析:\n[\n {{\n \\\"topic\\\": \\\"话题名称\\\",\n \\\"contributors\\\": [\\\"用户1\\\", \\\"用户2\\\"],\n \\\"detail\\\": \\\"话题描述内容\\\"\n }},\n {{\n \\\"topic\\\": \\\"另一个话题\\\",\n \\\"contributors\\\": [\\\"用户3\\\", \\\"用户4\\\"],\n \\\"detail\\\": \\\"另一个话题的描述\\\"\n }}\n]\n\n注意:返回的内容必须是纯JSON,不要包含markdown代码块标记或其他格式"
|
|
}
|
|
}
|
|
},
|
|
"user_title_analysis_prompts": {
|
|
"description": "用户称号分析提示词模板",
|
|
"type": "object",
|
|
"hint": "选择不同的用户称号分析风格",
|
|
"items": {
|
|
"default": {
|
|
"description": "默认用户称号分析提示词",
|
|
"type": "text",
|
|
"editor_mode": true,
|
|
"editor_language": "markdown",
|
|
"default": "请为以下群友分配合适的称号和MBTI类型。每个人只能有一个称号,每个称号只能给一个人。\n\n可选称号:\n- 龙王: 发言频繁但内容轻松的人\n- 技术专家: 经常讨论技术话题的人\n- 夜猫子: 经常在深夜发言的人\n- 表情包军火库: 经常发表情的人\n- 沉默终结者: 经常开启话题的人\n- 评论家: 平均发言长度很长的人\n- 阳角: 在群里很有影响力的人\n- 互动达人: 经常回复别人的人\n- ... (你可以自行进行拓展添加)\n\n用户数据:\n{users_text}\n\n请以JSON格式返回,格式如下:\n[\n {{\n \\\"name\\\": \\\"用户名\\\",\n \\\"qq\\\": 123456789,\n \\\"title\\\": \\\"称号\\\",\n \\\"mbti\\\": \\\"MBTI类型\\\",\n \\\"reason\\\": \\\"获得此称号的原因\\\"\n }}\n]"
|
|
}
|
|
}
|
|
},
|
|
"golden_quote_analysis_prompts": {
|
|
"description": "金句分析提示词模板",
|
|
"type": "object",
|
|
"hint": "选择不同的金句分析风格",
|
|
"items": {
|
|
"default": {
|
|
"description": "默认金句分析提示词",
|
|
"type": "text",
|
|
"editor_mode": true,
|
|
"editor_language": "markdown",
|
|
"default": "请从以下群聊记录中挑选出{max_golden_quotes}句最具冲击力、最令人惊叹的\\\"金句\\\"。这些金句需满足:\n- 核心标准:**逆天的神人发言**,即具备颠覆常识的脑洞、逻辑跳脱的表达或强烈反差感的原创内容\n- 典型特征:包含某些争议话题元素、夸张类比、反常规结论、一本正经的\\\"胡说八道\\\"或突破语境的清奇思路,并且具备一定的冲击力,让人印象深刻。\n\n对于每个金句,请提供:\n1. 原文内容(完整保留发言细节)\n2. 发言人昵称\n3. 选择理由(具体说明其\\\"逆天\\\"之处,如逻辑颠覆点/脑洞角度/反差感/争议话题元素)\n\n此外,我将对你进行严格约束:\n- 优先筛选 **逆天指数最高** 的内容:发情、性压抑话题 > 争议话题 > 元素级 > 颠覆认知级 > 逻辑跳脱级 > 趣味调侃级,剔除单纯玩梗或网络热词堆砌的普通发言\n- 重点标记包含极端类比、反常识论证或无厘头结论的内容,并且包含一定的争议话题元素。\n\n群聊记录:\n{messages_text}\n\n请以JSON格式返回,格式如下:\n[\n {{\n \\\"content\\\": \\\"金句原文\\\",\n \\\"sender\\\": \\\"发言人昵称\\\",\n \\\"reason\\\": \\\"选择这句话的理由(需明确说明逆天特质)\\\"\n }}\n]"
|
|
}
|
|
}
|
|
}
|
|
}
|