{"id":50665629,"url":"https://github.com/yangyuwuhan/astrbot_plugin_summary","last_synced_at":"2026-06-08T06:04:39.518Z","repository":{"id":358602479,"uuid":"1237716940","full_name":"Yangyuwuhan/astrbot_plugin_summary","owner":"Yangyuwuhan","description":"一个 AstrBot 插件，可通过 URL 下载视频并生成 AI 总结。","archived":false,"fork":false,"pushed_at":"2026-06-05T13:44:08.000Z","size":156,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-05T15:11:22.253Z","etag":null,"topics":["astrbot","astrbot-plugin","yangyuwuhan"],"latest_commit_sha":null,"homepage":"https://yangyuwuhan.fun","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Yangyuwuhan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-13T12:48:41.000Z","updated_at":"2026-06-05T13:43:56.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Yangyuwuhan/astrbot_plugin_summary","commit_stats":null,"previous_names":["yangyuwuhan/astrbot_plugin_summary"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/Yangyuwuhan/astrbot_plugin_summary","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yangyuwuhan%2Fastrbot_plugin_summary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yangyuwuhan%2Fastrbot_plugin_summary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yangyuwuhan%2Fastrbot_plugin_summary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yangyuwuhan%2Fastrbot_plugin_summary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yangyuwuhan","download_url":"https://codeload.github.com/Yangyuwuhan/astrbot_plugin_summary/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yangyuwuhan%2Fastrbot_plugin_summary/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34050242,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["astrbot","astrbot-plugin","yangyuwuhan"],"created_at":"2026-06-08T06:04:18.896Z","updated_at":"2026-06-08T06:04:39.505Z","avatar_url":"https://github.com/Yangyuwuhan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# astrbot_plugin_summary\n\n一个面向 AstrBot 的视频/音频总结插件。\n\n插件会根据用户输入的 URL 进行解析与下载资源，提取音频后调用必剪转写接口生成字幕，再交给 LLM 输出结构化中文总结。\n\n## 功能特性\n\n- 支持多平台 URL 解析，支持直链媒体作为回退兜底\n- 借助必剪接口实现音频转文字\n- 本地硬盘缓存，重复 URL 直接从本地获取字幕和总结内容，降低成本\n- 支持强制总结，复用本地字幕并重新调用 LLM，覆盖旧总结，防止偶然错误\n- 注册 LLM 工具，对话中自动识别视频/音频链接并提取内容，无需手动指令\n\n## 工作流程\n\n1. 用户发送 `/总结 url` 或 `/强制总结 url`指令\n2. 解析器识别并解析目标平台链接\n3. 下载媒体并提取音频\n4. 调用必剪接口进行字幕转写\n5. 按提示词模板构建 Prompt 并调用 LLM\n6. 返回总结结果，并按配置写入本地缓存\n\n## 安装方式\n\n下面本仓库zip文件，在astrbot仪表盘安装\n\n## 配置说明\n\n- `llm_provider`：总结使用的模型提供商，留空使用全局 LLM\n- `show_token_usage`：是否在结尾输出 token 使用情况与总结耗时\n- `enable_cache`：是否启用本地缓存\n- `processing_timeout`：LLM 总结超时秒数\n- `summary_template`：总结模板选择，仅支持内置 `default.txt` 和 `concise.txt`\n- `whitelist` / `blacklist`：白名单/黑名单\n- `source_max_size` / `source_max_minute`：下载资源大小与时长限制\n- `download_timeout` / `download_retry_times` / `common_timeout`：下载与请求超时控制\n- `proxy`：全局代理地址\n- `enable_media_summary_tool`：是否向 LLM 注册媒体总结工具\n- `enable_media_subtitle_tool`：是否向 LLM 注册字幕提取工具\n- `parsers_template`：各平台解析器开关与参数，默认启用 B站、抖音、直链媒体，具体请参考[astrbot_plugin_parser](https://github.com/Zhalslar/astrbot_plugin_parser) \n\n## LLM 工具\n\n插件注册了两个 LLM 工具，可在对话中由 LLM 自动判断并调用，无需用户手动输入指令：\n\n### `summary_extract_media_summary`（媒体总结工具）\n\n当对话中出现视频/音频链接时，LLM 可调用此工具获取内容的 AI 总结。\n\n- **流程**：解析链接 → 下载媒体 → 提取音频 → 必剪转写 → 调用插件配置的 LLM 生成总结 → 返回精炼摘要\n- **适用场景**：用户分享视频链接并询问\"这个视频讲了什么\"时，LLM 自动提取并总结\n\n### `summary_extract_media_subtitle`（字幕提取工具）\n\n提取视频/音频链接中的原始字幕文本（含时间戳），不进行 AI 总结。\n\n- **流程**：解析链接 → 下载媒体 → 提取音频 → 必剪转写 → 返回带时间戳的字幕\n- **适用场景**：需要逐字分析原始语音内容，或对字幕进行二次处理\n\n## 缓存策略\n\n当 `enable_cache=true`：\n\n- `/总结 url`：若命中 URL 对应总结缓存，直接返回缓存总结\n- `/强制总结 url`：若命中本地字幕缓存，跳过下载与转写，直接交给 LLM 重新总结并覆盖旧缓存总结\n- LLM 工具与 `/总结` 命令共用同一套本地缓存。\n\n缓存数据储存在 `data/plugin_data/astrbot_plugin_summary/cache/`\n\n## 注意\n\n- 支持的 URL 请参考 [astrbot_plugin_parser](https://github.com/Zhalslar/astrbot_plugin_parser) \n- 提示词模板位于 `data/plugins/astrbot_plugin_summary/core/prompts/`，可直接修改已有模板文件来自定义输出效果；插件更新时模板会恢复为仓库原模板。\n- 本插件的工作依赖于音频转文字，并非直接浏览视频\n- 本插件采用 **vibe coding**，作者已对其功能进行严格审查，但不保证插件稳定性\n\n## 致谢\n\n- 本项目使用了 [astrbot_plugin_parser](https://github.com/Zhalslar/astrbot_plugin_parser) 的部分代码实现资源下载\n- 本项目受 [astrbot_plugin_biliVideo](https://github.com/storyAura/astrbot_plugin_biliVideo) 启发，使用必剪的接口实现视频字幕提取\n- 本项目使用了 [astrbot_plugin_markdown_killer](https://github.com/AlanBacker/astrbot_plugin_markdown_killer) 的主要逻辑实现对 markdown格式 的严格剔除\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyangyuwuhan%2Fastrbot_plugin_summary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyangyuwuhan%2Fastrbot_plugin_summary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyangyuwuhan%2Fastrbot_plugin_summary/lists"}