Local Deep Research + pushplus:研究任务结束通知
效果:本地深度研究跑完(成功或失败)后,微信收到一条摘要,不用一直盯终端。
前置条件
- 一个 pushplus token(官网扫码获取)
- 已能跑通 Local Deep Research,能改启动命令或收尾脚本
把 token 放进环境变量,不要写进对话记录或公开配置。
配置步骤
在任务结束处调用接口。包一层启动脚本即可:
#!/bin/sh
set -e
# 按你的实际入口替换下一行
python -m local_deep_research "$@"
status=$?
if [ "$status" -eq 0 ]; then
content="研究任务已完成,请打开输出目录查看报告"
title="Local Deep Research 完成"
else
content="研究任务失败,退出码 ${status},请查看日志"
title="Local Deep Research 失败"
fi
curl -s -X POST "https://www.pushplus.plus/send" \
-H "Content-Type: application/json" \
-d "{\"token\":\"${PUSHPLUS_TOKEN}\",\"title\":\"${title}\",\"content\":\"${content}\",\"template\":\"markdown\"}"
exit "$status"
若软件自带「完成后回调 / webhook」,能自定义 JSON 就 POST:
{
"token": "你的token",
"title": "研究结束",
"content": "请打开 Local Deep Research 查看报告",
"template": "markdown"
}
只能填 URL 时用固定文案 GET。完整参数见 消息接口文档。
验证
curl -X POST "https://www.pushplus.plus/send" \
-H "Content-Type: application/json" \
-d '{"token":"你的token","title":"Local Deep Research 配置测试","content":"token 可用","template":"markdown"}'
返回 code 为 200 后,跑一个最短课题做收尾验证。
常见问题
任务很长只想结束推一次? 不要在每个子步骤 curl,只包最外层。
正文想带报告路径? 把输出目录拼进 content,注意不要带密钥。
收不到消息见 排查说明。